"I wasn't expecting this," said Hulk on the club's official website. "After Saturday's game I said I would help Porto win a third title in a row. Suddenly my agent rang to say a deal was done.
"I had no reasons to leave, but my agent called me and told that Porto and Zenit have reached a deal. This will be good for me, Porto and Zenit."
Hulk added that he is relishing the chance to play in Russia.
"This is another victory, yet another important step in my life," said the 26-year-old. "But I must say how grateful I am to Porto for opening the door to Europe. I was very happy in Portugal.
"I want to be happy at Zenit and in Russia as well. I want to keep moving in the same direction: winning matches and many titles as I did with Porto."
Zenit are currently at the top of the Russian Premier League table with 16 points from seven matches.