"I've been doing the show for a long time and I usually don't get nervous, but having the first lady on the set, I was really nervous," Cosgrove, 18, said in an interview with The Associated Press.
Nickelodeon and the White House want to show support for U.S. military families with a cameo by the first lady on the show.
On "iCarly," Cosgrove plays Carly Shay, the daughter of an Air Force colonel who is serving overseas.
In an episode titled, "iMeet the First Lady," Carly gets upset when her father's return from active duty is canceled because he is deployed again. Her friends decide to surprise her with a live feed to her father during an "iCarly" webcast. After Obama sees the webcast, she praises Carly for being such a supportive daughter to a father who is serving his country.
Cosgrove said that despite being nervous about meeting Obama, she found her quite approachable, calling the first lady a "nice, pretty normal person" who even danced with the cast during a regular segment called "Random Dancing."
The episode of "iCarly" featuring the first lady will air Jan. 16 on Nickelodeon.