Ilaix, 18, will fly to Germany to complete a medical ahead of signing a five-year contract with the Bundesliga side before Tuesday’s transfer deadline.
Barca had hoped to tie Ilaix down to a new contract, with his deal due to expire next year, but negotiations with his agents failed to yield an agreement this summer.
With neither party willing to budge from their initial position, Barca sent the youngster to train with the B team during preseason.
Sources told ESPN in August that the Catalan club were willing to let Ilaix leave but only in the event a club were willing to match their asking price.
In the event that no club met Barca’s demands, Ilaix risked being left in the stands for the season, training for the youth team and playing no competitive football. He could then have left for free in 2022.
However, after failing with an opening bid of around €6m, Leipzig returned to the negotiating table over the weekend and a final agreement was reached with Barca on Monday.
Sources have told ESPN the initial fee is worth around €15m but the transfer could end up costing the German club as much as €20m if a series of add-ons are met.
Ilaix first joined Barca in 2010 from rivals Espanyol and progressed through the club’s La Masia youth academy, eventually making his first team debut earlier this year under Ronald Koeman.
Koeman had hoped to keep Ilaix in the first team this season, with Barca rebuilding the side following the departure of Lionel Messi, and said recently he was disappointed the player and his representatives had decided to look elsewhere.
“I think his situation is horrible,” Koeman said on Aug. 20. “He is a young player, 18. He has had the chance to play for the first team. He is the future of this club… and he is in a situation where he’s not playing, not with us.
“I know what the club want to offer him. My advice to him is that money is not the most important thing. It is about playing games. But the player and his agents have decided differently. I am disappointed.”