The show revolves around two women who work in a diner in Williamsburg, Brooklyn, played by Kat Dennings and Beth Behrs.
Stewart will be making a cameo appearance as herself in the episode. Dennings and Behrs's characters will run into the TV host while at a fashion event at the Metropolitan Museum of Art. The two will try to get Stewart's opinion on cupcakes for their new baking business.
2 Broke Girls made its debut in the fall of last year, and proved a big hit in its time slot, leading to CBS announcing the show would be picked up for a full debut season.
Along with her cameo, Martha Stewart has also welcomed a second grandchild this month from daughter Alexis Stewart.
Stewart appears in the May 7 episode of 2 Broke Girls, at 8:30pm on CBS.
Watch a clip from 2 Broke Girls below: