The 27-year-old joined Watford in January and scored his first goal for the club in their opening day 2-2 draw against Everton in the Premier League this season.
The Mexico international said he hoped to break into the first team at Porto, who won the Champions League in 2003-04; in this year’s group stage, the Portuguese champions have been paired with Chelsea, Dynamo Kiev and Maccabi Tel-Aviv.
Layun told the Porto website: “I am eager to start training, to be at the same level as my team-mates and to fight for a spot in the starting team.
“The present is always the best moment, but I’ve definitely reached my full maturity. Emotionally, I’m in a great moment and all that will help me with the best performances on the pitch.”