Martins converted a 28th-minute penalty after a VAR check to give Bolivia – which lost 3-0 to host Brazil – an unlikely lead before star forward and captain Guerrero equalised on the stroke of half-time.
Guerrero then provided the assist for Jefferson Farfan's 55th-minute header and substitute Edison Flores added a third in the sixth minute of stoppage time.
Peru controlled proceedings throughout the first half but it struggled to create any clear-cut chances and the 2018 World Cup participants were left stunned when Bolivia broke the deadlock against the run of play.
There was confusion when the referee appeared to point to the spot for a handball against Peru's Carlos Zambrano in the 24th minute, but he then signalled for offside.
After a lengthy VAR check, a penalty was eventually awarded and Martins made no mistake as he coolly converted past Pedro Gallese four minutes later to move within two goals of Bolivia's all-time scoring record.
With time almost up in the opening period, Peru drew level. Christian Cueva dispossessed Bolivia on the halfway line and played a defence-splitting pass down the middle for Guerrero, who touched the ball around goalkeeper Carlos Lampe and finished into an empty net.
Farfan put Peru ahead 10 minutes into the second half following a towering header after Guerrero turned provider to tee up the Lokomotiv Moscow veteran.
Bolivia had a golden opportunity to restore parity but Erwin Saavedra blazed over from close range after Raul Castro's shot was parried into his path, with Flores adding some gloss to the scoreline in the 96th minute following a swift counter-attack.
What does it mean? Peru on track to qualify
After firing a blank against Venezuela, Peru got its tournament up and running. Quarterfinalist in 2016 and third the year prior, La Blanquirroja will be looking to at least match that run in Brazil.
Guerrero the hero… again
Wearing the captain's armband and topping Peru's scoring charts, the responsibility often falls on Guerrero. But the 35-year-old talisman thrives on it and he led the way again on Tuesday. His 36th international goal and an assist has Peru poised to progress.
Bolivia's woes continue
Martins' early goal gave Bolivia some hope but it was the same old story for Eduardo Villegas' team. Bolivia crashed to a fifth consecutive defeat, with the struggling South American nation still looking for their first victory since October 2018 – a run of nine games.
Peru will close out its group-stage campaign against host Brazil in Sao Paulo on Saturday, while Bolivia and Venezuela meet on the same day.
- IND vs AUS Live Score, 3rd T20I updates: India eyes series win as Australia’s World Cup stars return home; Toss at 6:30 PM IST
- IND vs AUS 3rd T20I Dream11 Prediction: India vs Australia predicted playing XI, line-ups, full squads
- I-League 2023-24: Real Kashmir moves to third on points table with a comfortable 4-0 victory against Inter Kashi
- From the ISL to the Premier League, five talking points from the world of football (Nov 20-26)
- BAN vs NZ, 1st Test: Phillips’ four-wicket haul dents Bangladesh on Day 1