The 22-year-old midfielder is currently in the Primeira Liga on a temporary deal for the duration of the 2016-17 season but will make the move permanent in the summer.
It is Oliver's second such loan spell with Porto after a season-long arrangement during the 2014-15 campaign, when he scored seven goals in 26 league games.
This season he has netted twice in 18 games in the Portuguese top flight and his form has convinced Porto to activate their option to sign him outright from Atletico.
"Porto... hereby informs the market that it has exercised the purchase option for the acquisition of the sporting rights of the athlete Oliver, for the amount of €20m, from Atletico Madrid," a club statement reads.
"It is further informed that the contract of employment with the player will be effective upon the termination of the loan agreement currently in force."
Oliver, a nominee for the 2014 Golden Boy award and highly rated as a youngster at Atletico, became a first-team player under Diego Simeone last season and made 30 appearances in all competitions.
He was deemed surplus to requirements last summer, however, and returned to Porto to link up with fellow Spaniards Iker Casillas and Ivan Marcano.
Oliver is yet to make his senior Spain debut but has been a regular for the Under-21 side. His 24 caps tie him for seventh place on the all-time list and he remains eligible for the current European Championship cycle, with the finals taking place this summer.