In 2010, after four years of playing Orson Hodge, MacLachlan decided to quit "Desperate Housewives" as he found the commute from his home in New York City to the set in Los Angeles increasingly difficult since becoming a father in 2008. However, he returned as a guest star in 2012 for season eight, the final season of "Desperate Housewives". He also guest starred as "The Captain" in season 6, 8 and 9 of "How I Met Your Mother" starting in 2010 and with a final appearance in 2014.