The 22-year-old is yet to play a competitive first-team game for Porto but has had loan spells with Academica Coimbra and Rio Ave.
He will not be available until after September's international break because of an ankle injury.
"Fulham has a reputation of a Premier League club and this season I want to help put the club back in the place it belongs," he told the club's website.
Fulham say they fought off "two major European clubs" to sign Soares, who has been capped by Portugal at under-21 level.
Tony Khan, vice-chairman and director of football operations, said: "Rafa was worth the effort to pursue and, once he steps onto the pitch, our supporters will also see that he is worth the wait.
"We were well aware of his injury during the recruitment process and are more than comfortable moving ahead, as Rafa's talent as a defender speaks for itself."
Fulham's attempts to sign Cardiff left-back Joe Bennett were thwarted when he turned down a move to Craven Cottage.
Find all the latest football transfers on our dedicated page.
Fulham have signed Porto left-back Rafa Soares on a season-long loan deal.