Jason Segel is now an author. The "How I Met Your Mother" star has inked a book deal with Random House to write a children's series.

The actor is co-writing "Nightmares!" with author Kirsten Miller. The series will center on a group of kids who must save their hometown from fear, which has manifested itself in the form of nightmare creatures that appear in the everyday world.

Segel said in a statement: "Ultimately, it's a story about learning that we can accomplish anything, as long as we are brave enough to try. These are the types of stories that always inspired me."

The three-book series is based on manuscripts that Segel wrote prior to launching a successful acting career. The first book is scheduled for release in fall 2014.

Segel has starred in the films "The Muppets," " The Five-Year Engagement," "I Love You Man" and "Forgetting Sarah Marshall." He stars in the upcoming comedy "This Is The End" about six friends who are trapped in a house after strange, catastrophic events devastate Los Angeles. It hits theaters in June.