In 2010, Harris provided voice acting for the role of the adult Dick Grayson (Nightwing) in the animated film Batman: Under the Red Hood and the beagle Lou in the film Cats & Dogs: The Revenge of Kitty Galore.The same year, he played the lead in the indie comedy The Best and the Brightest.Burtka, though not the biological father of his ex Lane Janger's children, who had also been born via surrogate, remained close to them over the years.Following the passage of the Marriage Equality Act in New York on June 24, 2011, Burtka and Harris announced their engagement via Twitter, stating that they had proposed to each other five years earlier but had kept the engagement secret until same-sex marriage became legal in their state.Burtka made a cameo appearance, in A Very Harold & Kumar 3D Christmas, as himself; in it, he also shared a scene with Neil Patrick Harris, in a part that was much like his character from How I Met Your Mother.Burtka starred in Osiris Entertainment's 2013 film Annie and the Gypsy, Burtka returned to Broadway in a comedy play, which David Hyde Pierce directed, titled It Shoulda Been You.Six months after Burtka's first How I Met Your Mother appearance, allegations arose that the actor had received the part because of a romantic relationship with one of the show's stars, actor Neil Patrick Harris.
His other films include Starship Troopers (1997), Beastly (2011), The Smurfs (2011), The Smurfs 2 (2013), A Million Ways to Die in the West (2014), and Gone Girl (2014).
He trained in acting at Interlochen Center for the Arts, obtained his Bachelor of Fine Arts from the University of Michigan and had further training at the William Esper Studios.
Burtka made his television debut in 2002 with a guest role on The West Wing; this was followed by guest appearances on Crossing Jordan.
On television, he is known for playing the title character on Doogie Howser, M. (1989–1993), Barney Stinson on How I Met Your Mother (2005–2014, for which he was nominated for four Emmy Awards), and Count Olaf in A Series of Unfortunate Events (2017–2019).
Harris is also known for his role as the title character in Joss Whedon's musical Dr.After his role on How I Met Your Mother, Burtka gained media attention for dating Neil Patrick Harris, whom he later married in 2014.