Joao Teixeira will join Porto from Liverpool on a free transfer, the Portuguese club announced on Monday.
Teixeira, 23, has struggled for first-team opportunities since making the switch from Sporting CP in 2012.
The midfielder played just three minutes of Premier League football in 2015-16, making six other senior appearances.
He will return to his homeland after over four years at Anfield as Porto look to break Benfica's dominance on the domestic front.
"I am very happy," Teixeira told Porto's official website. "It's a dream for me to play in this great club.
"I have aspired to wear this shirt because I was used to seeing FC Porto win over the years.
"I hope everything goes well and I want to give my best."
Teixeira's deal will keep him at the Estadio do Dragao until 2020.