Abdulrahman Bashir opened scoring for Enyimba In the second minute, while Victor Mbaoma added the second a minute later.
Sherif Jimoh pulled a goal back for the hosts in the sixth minute.
Austin Oladapo restored Enyimba’s two-goal cushion in the 25th minute.
However, San Pedro fought back to pull a goal back just before half time through Rolan Zan Bi.
Enyimba then made the tie safe in the second half with goals from Mbaoma and Stanley Dimgba.
The Peoples Elephant finished second behind Morocco’s Hassania Agadir in Group D with 10 points.
Closest group rivals Paradou AC from Algeria finished third on eight points after they upset group winners Hassania Agadir 3-0 in Morocco.