Brazil named an unchanged line-up for their World CupGroup E match against Serbia on Wednesday while their opponents made three changes to the side who lost 2-1 to Switzerland.
Brazil looked to utilise their pace to get in behind Serbia, who held firm at the back initially despite a couple of early scares.
Anxious no more, Brazil is through at the World Cup.
Philippe Coutinho was the architect in central midfield, lofting a long ball into the path of Paulinho who broke the offside trap and let the ball bounce once before lifting it over the onrushing Stojkovic into the goal.
Roared on by their outnumbered but deafening fans, striker Aleksandar Mitrovic had one instinctive reaction header blocked on the line and another well saved by Alisson as suddenly another upset seemed possible.
It was Paulinho's eighth goal since Tite took the helm in 2016 and brought his former Corinthians star back into the set-up, with only Neymar and Gabriel Jesus (10) scoring more for Brazil in the same timeframe.
Brazil did what it had to do to win, making sure it wasn't the second big team to exit the tournament after 2014 champion Germany was knocked out by South Korea.
Switzerland also advanced after a 2-2 draw with Costa Rica and will next face Sweden on Tuesday in St. Petersburg.
A win or even a draw will be enough for Switzerland to book themselves a ticket for the knockout stages. Serbia ended in third place with three points.
Neymar wasn't far away from doubling their lead on the stroke of half-time with a curling shot from 20 yards out that dipped just over the goal, after combining with Luis on the left.
Mitrovic then headed straight at Alisson when he found himself free in the box, as Serbia failed to land the telling blow with Brazil rocking.
That gave Brazil the breathing space they craved, and they noticeably relaxed with the two-goal cushion as Serbia ran out of ideas and steam.