The How I Met Your Mother star will play villainous Count Olaf in the project, which revolves around two orphans on a quest to find out more information about their parents' deaths. Ted star Patrick Warburton will provide his voice for narrator Snicket.

The TV series, which will air on Netflix, will be directed by Men in Black's Barry Sonnenfeld and is scheduled to begin filming in Vancouver later this month (Mar16).

Jim Carrey took on the role of Count Olaf in the 2004 movie, which also featured Jude Law and Meryl Streep.

The latest casting news comes three months after Neil's live TV variety series Best Time Ever was cancelled.