The Spaniard, who is on a year-long sabbatical from football management, said that he was invited by European Ryder Cup captain Jose Maria Olazabal.
"I live close to Chicago, and it's a good time to travel here and enjoy the Ryder Cup," Guardiola told BBC Sport.
"I have a year off from football, and I'm resting. This is my first time at a Ryder Cup. Olazabal invited me here, and I'm having a good time."
Guardiola left Barcelona after a hugely-successful four-year spell in charge of the Catalan club.