The Portuguese side went ahead early on through a Ricardo Quaresma penalty, after Manuel Neuer tripped striker Jackson Martinez in the box.
Winger Quaresma then dispossessed Dante before running through on goal and calmly slotting a second into the net.
Thiago pulled a goal back for Bayern, but Martinez grabbed a brilliant third. The return leg takes place on 21 April.
Porto hold a significant advantage in the tie as they aim to reach their first semi-final since winning the competition in 2004 under Jose Mourinho.
Their performance was built on hard work and pressure, before moving the ball quickly to the front, but they were helped by shambolic defending from Bayern.
Barcelona forward Luis Suarez says he had no option but to nutmeg Paris St-Germain defender David Luiz twice as he scored two brilliant goals in Paris.
Suarez easily cut inside ex-Chelsea player Luiz on his way to putting Barca 2-0 up before repeating the trick as he scored a stunning third goal.
“I had to nutmeg Luiz twice because there was nothing else I could do.”
He took his tally to 17 goals for Barca this season – including 11 in his last 11 – with his double in Paris to put Barca on the brink of the semi-finals of the Champions League.
Luis Suarez twice got the better of David Luiz – who cost PSG £50m in the summer – in Paris
After Neymar had put the Spanish side ahead, Suarez struck his first goal of the night, threading the ball between Luiz’s legs at pace, holding off a challenge from Maxwell and firing home.
His second of the night was even better, again nutmegging Luiz before striding on and planting a shot into the top corner. A cautious Suarez said: “In football you never know what’s going to happen.
“They have so much quality and we need to be aware that this is not over. It’ll be a good game.”