The 22-year-old actress will appear in a 2013 episode of the sitcom, CBS confirmed via the network's official Twitter account.
Details of Benson's role have yet to be confirmed, though her character will have some connection to Barney (Neil Patrick Harris).
Benson will next be seen in 2013 movie Spring Breakers opposite Vanessa Hudgens and Selena Gomez. Her past credits include roles on NBC soap Days of our Lives and short-lived ABC drama Eastwick.
Rachel Bilson is also expected to reprise her role as Cindy - the roommate of Ted's (Josh Radnor) future wife - on How I Met Your Mother's eighth season.
It is currently unclear if the long-running comedy will continue beyond its eighth run, with co-creators Carter Bays and Craig Thomas confirming that the show's team are writing the current season "like it's the end".
How I Met Your Mother continues on Mondays at 8/7c. In the UK, the series airs on E4.
> 'How I Met Your Mother' to air hour-long holiday special
> Seth Green to appear on 'How I Met Your Mother'
Watch a clip from How I Met Your Mother below: