The five-time world champions were inspired by Neymar, who had a hand in all three goals after Brazil had gone behind to an opportunist strike from Raul Meireles. (Agencies)
The young Barcelona striker was singled out by Portuguese defenders for some rough treatment early on but his passes led to goals for Thiago Silva, who headed home his corner kick, and Jo, who bundled the ball home from close range after Maxwell had pushed a Neymar pass across the front of goal.
Between those two scores, the former Santos player scored a brilliant individual goal that started when he ran at defenders from 40 yards out and culminated with an unstoppable shot from inside the penalty box.
"The important thing is not to react to the provocations and the professional fouls," he said when asked about the elbows and kicks repeatedly aimed at him.
The game was the biggest test for Brazil since they demolished world champions Spain to win the Confederations Cup in July.
They made just one change from the side that beat Australia 6-0 last weekend with Maxwell replacing Marcelo, who dropped out because of injury. Portugal were without the injured Cristiano Ronaldo.
Brazil started shakily but soon recovered and never looked like relinquishing control after Thiago Silva's equaliser in the 24th minute.
Both sides noticeably lowered the tempo after halftime and the game petered out amid a slew of substitutions.
Brazil qualified automatically for next year's tournament as hosts and continue their preparations with friendlies against South Korea and Zambia next month.
The five-time world champions were inspired by Neymar, who had a hand in all three goals after Brazil had gone behind to an opportunist strike from Raul Meireles.