"FC Barcelona and Leeds United Football Club have reached an agreement in principle for the transfer of Raphael Dias Belloli, Raphinha, pending the player passing his medical," Barcelona said in a statement.
Financial details were not disclosed but Spanish media reported that Barcelona will pay 58 million euros in a fee that could go up to 68 million with the agreed add-ons.
Chelsea and Arsenal both tried to make a late push in an effort to sign the player, but the Brazil international chose to join Barcelona, who finished second in La Liga last season.
In a two-line statement, Leeds United confirmed the agreement.
Raphinha made 65 appearances for the Yorkshire club in two seasons and was instrumental in keeping them in the Premier League, scoring a pivotal goal in a 2-1 victory over Brentford in their final game of the campaign, which ensured their survival.