Mark Hudis ('True Blood') is exiting his role as showrunner on the straight-to-series adapatation.

Neil Patrick Harris is returning to the small screen.

The How I Met Your Mother grad is in negotiations to star in Netflix’s adaptation of the best-selling children’s book A Series of Unfortunate Events, The Hollywood Reporter has learned. Additionally, Mark Hudis has exited the straight-to-series drama as showrunner. A replacement has yet to be named. Netflix declined comment.

Paramount Television is producing the series in association with Netflix, with Daniel Handler, the author of the books who uses the pen name Lemony Snicket, executive producing.

A Series of Unfortunate Events tells the tale of orphaned children Violet, Klaus and Sunny Baudelaire, who finds themselves in the villainous clutches of an evil uncle named Count Olaf who has designs on their family fortune.

Jim Carrey played the plum and showy role of the uncle in the 2004 movie that also starred Meryl Streep. Now Harris would play him. The movie was directed by Brad Silberling, who has also been tapped to helm the new series.

The role marks awards-show staple Harris' return to serialized television following his Emmy-nominated turn on CBS' How I Met Your Mother, which ran for nine seasons and 200-plus episodes. He recently hosted NBC's short-lived variety show Best Time Ever, which was canceled after one low-rated season. The casting may come as a bit of a surprise after the Peacock network signed Harris' company to a production pact for either a scripted or unscripted project, possibly with Harris at the helm.

On the film side, Harris next has Alexander Payne's Downsizing, opposite Matt Damon and Jason Sudeikis. That project is due to start shooting in the spring. Harris is repped by CAA and Bloom Hergott.

Netflix picked up Unfortunate Events in November 2014 with a 13-episode straight-to-series order. An official premiere date has not yet been announced.

Updated Jan. 15, 5:30 p.m., to correct that Brad Silberling directed the movie version, not Barry Sonnenfeld.