The bank's logo has covered thousands of "Boris bikes" since the scheme began in July 2010, for a promised total payment of £50m, in an arrangement that has drawn criticism over the manner of its awarding and the modest sums raised for widespread branding across the capital.
Barclays' decision comes in the wake of increased public concern about cycle safety in London, with a mounting death toll. In July, Philippine De Gerin-Ricard, a 20-year-old French-born student became the first person to be killed riding a Boris bike.
However, Barclays said its decision was part of a wider review of commercial partnerships, as the bank examines deals undertaken directly by its former chief executive, Bob Diamond, as it tries to move on from that era.
It is understood that Barclays executives met the mayor's "cycling tsar", Andrew Gilligan, last month to inform him that the bank would be withdrawing its backing. Talks have been continuing in confidence between Barclays and Transport for London (TfL).
Johnson had hoped to secure a new sponsor before the decision was publicised, but after controversy surrounding the original securing of the Barclays sponsorship deal, he and TfL bosses are keen that the process should be entirely transparent and formal.
Barclays said that they would be honouring the term of the contract until August 2015, and in a joint statement the bank and TfL claimed that they had mutually agreed against "an option to extend".
However, the mayor had announced in 2011 that Barclays would continue to back the scheme for a further three years, up to 2018.
Questions were also raised over the original award of the contract in 2010 given Johnson's close links to Diamond, who quit Barclays last year in the wake of the Libor scandal. An investigation by the London assembly's budget committee said it was questionable whether TfL had secured the best deal with Barclays, especially in extending its contract rather than returning to the open market for a new sponsor.
It also said that the terms of the contract with Barclays could mean that the agreed £50m would never be paid in full. The London assembly also warned the mayor more broadly about TfL's "ad hoc approach to sponsorship" which could expose it to unnecessary reputational risk from sponsors.
But increasing bad publicity about cycle safety in London may have contributed to the bank reassessing its sponsorship. A blue similar to Barclays' colours has also been painted across major roads on the mayor's "cycle superhighways".
While the mayor had pledged to bring the bikes in at no cost to the taxpayer, figures obtained from TfL this year showed that sponsorship and user charges covered barely half the costs.
Caroline Pidgeon, leader of the London Assembly's Liberal Democrat group, said: "Barclays have received immense benefits from the publicity given to the cycle hire scheme in its early years, but now that its performance is looking shaky they appear to be bailing out.
"Fundamental questions have to be asked as to how such a one-sided deal was ever struck between Transport for London and Barclays."
TfL's director of commercial development, Graeme Craig, said: "Barclays has not pulled out of the cycle hire sponsorship deal. After the current sponsorship deal with Barclays ends – in two years' time – the cycle sponsorship portfolio will fundamentally change.
"Barclays remains committed to the sponsorship agreement signed in 2010, but the bank and TfL have decided not to take up the option to extend it. Several months ago Barclays began the process of a strategic review of its sponsorship programmes and has now made a commercial decision not to continue the sponsorship."
guardian.co.uk © Guardian News and Media Limited 2010