Jason Segel Sells Three-Book Children's Series

The "How I Met Your Mother" star will co-write a series about kids saving their neighborhood from fear with author Kirsten Miller.

Actor Jason Segel (How I Met Your Mother) has signed a three-book deal with Random House for a middle-grade series, Nightmares!, the publisher announced Tuesday.

The adventure series centers on a group of friends who try to save their neighborhood from fear.

“Ultimately, it’s a story about learning that we can accomplish anything, as long as we are brave enough to try,” Segel said in a statement.

Kirsten Miller, the author of previous middle-grade series Kiki Strike and The Eternal Ones, will co-author with Segel.

Segel revealed that the books were in the works three weeks ago during a forum with director Jonathan Demme following a screening of their 2008 film Forgetting Sarah Marshall.

During the event at the Jacob Burns Film Center in Pleasantville, N.Y., Segel said the idea originally started as a screenplay he sold "super cheap" before he became a well-known actor.

The project was never made and eight years later he bought it back for the same amount he sold it for.

Once he re-acquired the project he decided to rework it as a children's book series. 

The first novel in the trilogy will be published in 2014.