The actor, who is currently starring in Disney’s Christopher Robin film, will read Patricia Hegarty’s Everybody’s Welcome, illustrated by Greg Abbott.
He follows in the footsteps of the likes of actors Tom Hardy and Damian Lewis, astronaut Tim Peake and singers Sir Elton John and Dolly Parton in hosting the slot for children.
Trainspotting star McGregor said: “It’s such an honour and pleasure to join an incredible list of actors to read a CBeebies Bedtime Story to children all over the UK.
“I had a great time filming and I hope everyone enjoys watching it.”
Everybody’s Welcome tells the tale of a mouse who dreams of building a home where he can welcome those in need, no matter who they are or where they are from.
He learns that if they work as a team, they can build a house to keep everyone safe and warm and where everybody feels welcome.
The BBC said the story “reflects CBeebies’ ethos of ‘Everyone’s Welcome at CBeebies’ celebrating diversity, inclusiveness and kindness”.
McGregor’s Bedtime Story airs at 6.50pm on August 17. CBeebies Bedtime Stories is on daily at 6.50pm.