The match against the Championship side is scheduled to take place in the week commencing Monday 28 February.
The draw, conducted by former City forward Andrew Cole at Wembley Stadium, took place live on ITV ahead of Liverpool's fourth round fixture at home to Cardiff City.
Peterborough earned their spot in the fifth round of the FA Cup with a 2-0 win over fellow Championship side Queens Park Rangers.
Posh currently sit 22nd in the second tier and have reached this stage of the competition for the first time since 1986.
City have only faced Peterborough on one previous occasion, coming out on top in the FA Cup with a 1-0 win at London Road in February 1981.
In total, City have won the FA Cup on six occasions, with out most recent triumph coming in 2019.
Since beating Watford in our domestic clean sweep that year, Guardiola's men have reached the semi-final stage in each of the last two editions of the famous competition.
Selected matches will be shown both on BBC and ITV Sport, with the chosen ties confirmed later in the month.
FA CUP FIFTH ROUND DRAW
Luton Town v Chelsea
Crystal Palace v Stoke City
Peterborough United v Manchester City
Liverpool/Cardiff City v Norwich City
Southampton v West Ham United
Middlesbrough v Tottenham Hotspur
Nottingham Forest/Leicester City v Huddersfield Town
Everton v AFC Bournemouth/Boreham Wood