The Barcelona star curled home an exquisite free-kick after just 12 minutes, but was lucky to stay on the field when he chopped down Andres Roa, sparking a brawl between both sets of players and coaches.
Brazil kept their cool, and a fourth clean sheet in four Games matches, as Luan's dipping effort eight minutes from time set up a semi-final meeting with Honduras in Rio on Wednesday.
Germany remained on course for a mouthwatering rematch with Brazil in next Saturday's final, two years on from their 7-1 thrashing of the hosts at the 2014 World Cup, by disposing of Portugal 4-0 in Brasilia.
Brazil edged the latest instalment of a bad-tempered trilogy with South American rivals Colombia in Sao Paulo with Neymar the focus of attention for good and bad reasons.
Neymar missed the Germany semi-final two years ago. He left the field in tears on a stretcher with two broken vertebrae to bring his home World Cup to a cruel end when Brazil dumped a James Rodriguez-inspired Colombia out of a bruising quarter-final that included 54 fouls.
Colombia got their revenge by ending Neymar's tournament prematurely once more at last year's Copa America, this time through suspension.
The Brazilian lost his head at the end of a 1-0 defeat and aimed a head-butt at Jeison Murillo provoking a four-game ban. Neymar finally got off the Olympic mark when he curled home a free-kick from 25 yards.
However, his history with the Colombians sparked clashes just before the break when he viciously kicked Roa from behind.
He got only a yellow card. Brazil controlled the game after the break and sealed their place in a third consecutive Olympics semi-final when Luan's effort dipped over Cristian Bonilla seven minutes from time.
Honduras lie in wait in the last four as they stunned South Korea 1-0 thanks to Alberth Elis's brilliantly taken solitary goal decided their clash in Belo Horizonte.
Germany were in ominous form as Arsenal's Serge Gnabry became the Olympics' top scorer and ended Portugal's hopes of adding gold to a glorious 2016 after winning the European championships last month.
"I'm not surprised. I have said from the beginning with more games the better we will get as a team," said Gnabry.