Barca will pay an initial 105m euros (£96.8m) for the France international, 20, who has agreed a five-year contract and will undergo a medical on Monday.
The deal is eclipsed only by Neymar's recent £200m move to Paris St-Germain.
Barca revealed that his deal will contain a release clause of 400m euros.
Dembele has not featured for Dortmund since the German Super Cup on 5 August. The German side rejected a bid from Barca for the forward earlier in August, with the player then suspended for missing training.
Dortmund said they rejected Barca's approach because their offer "did not correspond to the extraordinary footballing and additional value of the player and the present economic situation of the European transfer market".
With regard to the fee now agreed, Dortmund said in a statement that the payment of add-ons "was agreed up to a maximum total amount of approximately 40% of the fixed transfer fee".
Barca have failed with three bids for Liverpool midfielder Philippe Coutinho, with their most recent offer of £114m turned down last Friday.
Luis Suarez's transfer from Liverpool in 2014 is officially their most expensive purchase, at £75m.
However, Barca president Josep Maria Bartomeu has previously that said "the overall cost of the operation" to sign Neymar from Brazilian club Santos in 2013 was "over 100m euros (£92m)", despite the transfer fee having been disclosed as £48.6m.
Dembele exploits attract Barca's attention
Last season, Dembele scored 10 goals and provided 21 assists as Dortmund finished third in the Bundesliga and won the German Cup, also reaching the Champions League quarter-finals.
He joined Dortmund from French side Rennes on a five-year deal in May 2016, having been voted Ligue 1 young player of the year for the 2015-16 season, when he scored 12 goals and made five assists.
Demeble made his senior France debut in 2016, the only goal in seven caps to date coming in a 3-2 friendly victory over England in June.
He was left out of the France squad for September's World Cup qualifiers against the Netherlands and Luxembourg, with manager Didier Deschamps explaining on Thursday: "Ousmane hasn't trained for a fortnight and he's waiting to see if the transfer will go ahead or won't go ahead."
The second biggest transfer ever
2017 - Neymar £200m (Barcelona to Paris St-Germain)
2017 - Ousmane Dembele £135.5m (Dortmund to Barcelona, subject to completion)
2016 - Paul Pogba £89m (Juventus to Manchester United)
2013 - Gareth Bale £85m (Tottenham Hotspur to Real Madrid)
2009 - Cristiano Ronaldo £80m (Manchester United to Real Madrid)