In the show, AFC Richmond were taking on Man City and Guardiola himself was managing the fictional City team from the sidelines.
He then got a few short lines later in the episode during a brief discussion with Ted and Coach Beard.
The reigning Premier League champion is seen shaking hands with Ted and saying "good game, congratulations" before giving a Lasso-esque speech of his own where he said: "Don't worry about wins or losses.
"Just help these guys be the best version of themselves on and off the pitch. This, at the end, is the most important thing."
Fans of the show were over the moon to see one of the most decorated managers in the game turn up for the cameo with one tweeting: "Pep Guardiola showing up on #TedLasso only for man city to lose 2-0 to richmond has sent me."
Another said: "Winning the Premier League title or Ted Lasso cameo, which is the bigger recent Pep w? hard to tell lmfao."
One fan was particularly excited to see the former Barcelona player turn up, writing: "THIS WAS THE BEST TED LASSO EPISODE EVER!!! PAPA PEP IS A FUTURE OSCAR WINNER."
Ted Lasso has incorporated numerous real world football figures into the show for cameos across its three seasons. Commentators Arlo White and Chris Powell have appeared on the show since the start while Soccer Saturday figures Jeff Stelling and Chris Kamara have also made recurring appearances.
Gary Lineker and legendary Arsenal striker Thierry Henry have also popped up on Ted Lasso while several characters are known to be based on real players.
Read more: Pep Guardiola wants PL charges dealt with as soon as possible (PA Sport, 4 min read)
The basis for Roy Kent is Manchester United legend Roy Keane while Jamie Tartt is modelled on current Manchester City winger Jack Grealish.
The final episode of Ted Lasso's third season is released on Apple TV+ on 31 May.
Watch below: Jason Sudeikis has admitted Donald Trump inspired him to change Ted Lasso