Sousa led 5-2 and 30-0 on Fognini's serve, but the Portuguese player lost his composure and then started complaining to the chair umpire at the end of the second set and midway through the third.
''I'm not happy today. I was I think a bit lucky,'' Fognini said. ''It was a really difficult match.''
The 10th-seeded Fognini, who lost to title-holder Novak Djokovic in last year's semifinals, was the highest seeded player in action Monday in the clay-court tournament.
Fognini failed to serve out the first set at 5-4 and then his game fell apart.
''I was completely without energy, without power in my legs,'' he said. ''I have no idea what happened.''
After Fognini had served out the second set, the crowd jeered Sousa - who had received a warning during the first set. At 3-2 down in the third, Sousa continued to grumble, saying ''it's a joke, it's a joke.''
Fognini next plays Roberto Bautista Agut of Spain, who beat Canada's Vasek Pospisil 6-2, 6-2. Robredo, who saved eight of the nine break points he faced and broke Goffin's serve four times, next faces Julien Benneteau or Jurgen Melzer.
Later, 11th-seeded Tommy Robredo of Spain was playing qualifier David Goffin of Belgium.
Rosol beat Evgeny Donskoy 7-5, 6-1; Kohlschreiber won 6-3, 6-4 against Simone Bolelli; Stepanek thrashed Ivo Karlovic 6-1, 6-2; Ramos beat Jarkko Nieminen 6-2, 7-5 and Andujar downed Edouard Roger-Vasselin 2-6, 7-5, 7-6 (5).
On Tuesday, Djokovic plays Montanes in the second round. On Wednesday, eight-time champion Rafael Nadal of Spain faces Gilles Simon or Teymuraz Gabashvili, and fourth-seeded Roger Federer takes on Stepanek.