Hahn was born in Westchester, Illinois, the daughter of Karen and Bill Hahn. She has German, Irish, and English ancestry. She was raised Catholic. Hahn grew up in Cleveland Heights, Ohio and attended Beaumont School. She attended Northwestern University, where she obtained a bachelor's degree in theatre before attending Yale University. While attending Yale School of Drama, Hahn starred as Sally Bowles in Cabaret and as Célimène in Molière's play The Misanthrope.
Hahn's first appearance on a show was Hickory Hideout, a local puppet show for children for then-NBC owned-and-operated station WKYC in Cleveland (which by its end, aired on all of NBC's O&O stations). While attending a theater festival she met an NBC casting director who introduced her to creator/producer Tim Kring, who created the role of Lily Lebowski in Crossing Jordan for her. The series aired from 2001 to 2007. Hahn has said of meeting Kring, "NBC and Tim Kring took a huge leap of faith in casting me. To be worked into a show that was in production and on the schedule, is an amazing stroke of luck". On October 21, 2008, TV Guide reported that Hahn signed a talent holding deal with Fox.
In 2003, Hahn played supporting role opposite Kate Hudson and Matthew McConaughey in the romantic comedy film, How to Lose a Guy in 10 Days. The following year, she appeared in Win a Date with Tad Hamilton!, Anchorman: The Legend of Ron Burgundy, Around the Bend, and Wake Up, Ron Burgundy: The Lost Movie. She later had more supporting roles in films, including the 2005 romantic comedy-drama A Lot like Love starring Ashton Kutcher and Amanda Peet, The Holiday (2006) with Cameron Diaz, the science fiction adventure drama The Last Mimzy (2007) alongside Rainn Wilson, Step Brothers (2008), Revolutionary Road (2008) starring Leonardo DiCaprio and Kate Winslet, The Goods: Live Hard, Sell Hard (2009), How Do You Know (2010), Our Idiot Brother (2011), and Wanderlust (2012).
On television, Hahn starred alongside Hank Azaria in the short-lived NBC comedy series, Free Agents (2011), a remake of the British series of the same name. She had recurring roles on HBO shows Hung and Girls. From 2012 to 2015, she received praise for her recurring role on the NBC comedy series, Parks and Recreation as Jennifer Barkley, campaign manager to Leslie Knope's (Amy Poehler) opponent Bobby Newport (Paul Rudd, whom she starred alongside in Our Idiot Brother, How Do You Know, and Wanderlust). She received a Critics' Choice Television Award nomination for Best Guest Performer in a Comedy Series for her performance.
In 2013, Hahn played her first leading role, in the comedy-drama film Afternoon Delight written and directed by Jill Soloway. The film premiered at the 2013 Sundance Film Festival. For her role, she was nominated for a Gotham Independent Film Award for Best Breakthrough. Later that year, Hahn appeared opposite Jennifer Aniston in the box-office hit We're the Millers, and co-starred alongside Ben Stiller and Kristen Wiig in The Secret Life of Walter Mitty. In 2014, she starred in the comedy film Bad Words opposite Jason Bateman, the ensemble comedy-drama This Is Where I Leave You, and Peter Bogdanovich's She's Funny That Way opposite Owen Wilson.
In 2014, Hahn was cast as Rabbi Raquel Fein in the Amazon Studios critically acclaimed dark comedy-drama, Transparent created by Jill Soloway. She received a personal Emmy nomination for Outstanding Supporting Actress in a Comedy Series (2017) as well as a Screen Actors Guild Award nomination along with the cast. In 2015, she starred alongside Steve Coogan in the Showtime comedy-drama, Happyish. The series was canceled after a single season. That same year, Hahn co-starred with George Clooney and Hugh Laurie in the science-fiction adventure film Tomorrowland, and starred in the box-office horror hit The Visit.
In 2016, Hahn appeared opposite Viggo Mortensen in the drama film Captain Fantastic, and starred alongside Mila Kunis, Christina Applegate, Kristen Bell and Jada Pinkett Smith in the comedy film Bad Moms. IndieWire's Kate Erbland gave the film a B-, noting that it “boasts some good jokes but Hahn’s revelatory performance is the big draw.” She will next appear in the Amazon comedy pilot I Love Dick, based on the novel by the same name by Chris Kraus, directed by Jill Soloway, which premiered on August 19, 2016. Hahn was instrumental in having Dino Stamatopoulos fired from the cast of 'I Love Dick.' Stamatopoulos, who was initially slated to play Griffin Dunne's role, revealed to Hahn before shooting that he had once tried heroin and hated it, a story which Hahn then revealed to Soloway, who promptly fired Stamatopoulos before shooting began.
Hahn has been married to actor Ethan Sandler since January 3, 2002. The couple reside in Los Angeles, and have two children: a son, Leonard (b. 2006) and a daughter, Mae (b. 2009).