Bury-born Lewis, 18, joined City’s academy as an eight-year-old and progressed through the youth ranks, going on to make 23 appearances with the first team last season as Pep Guardiola’s side won the Treble.
Lewis’ deal will keep him at City until the summer of 2028.
“It’s been an unbelievable year for me and now to sign this contract is a dream come true,” Lewis said on the Manchester City website.
“As a City fan, I can remember watching us winning trophies when I was young and it’s the only place I’ve wanted to be.
“To know I’m going to be here until 2028 is fantastic and I can’t wait to keep working and keep improving.”
City’s director of football Txiki Begiristain added: “Rico is a really intelligent footballer and is already a mature and reliable member of the squad.
“He absorbs every single piece of information Pep gives him, which for a player of his age is special.
“We are very proud to have watched his journey through the academy and to see him playing with such confidence in the first team.
“His energy and hunger around the squad is contagious and we believe he can help to bring more success in the coming years.”