Captain Thiago Silva bundled in Neymar's corner at the back post to put the hosts ahead in the seventh minute before Luiz thundered home a dipping 30-metre free kick midway through the second half at the Castelao arena.
Colombia had a goal disallowed before in-form James Rodriguez dragged his side back into the match from the penalty spot with just over 10 minutes remaining, his sixth goal of the tournament.
Brazil forward Neymar was carried off on a stretcher in the closing stages but the hosts hung on to set up a semi-final against Germany, who beat France 1-0 earlier on Friday in Rio de Janeiro.