O2 will lose around one third of its current wi-fi hotspot network as a result.
In an email to customers, O2 points out that its own network of more than 8,000 wi-fi hotspots will still be available in various shops and restaurant chains.
It also argues that the impact will be lessened as only about 4,200 of the 5 million BT Openzone hotspots around the UK have been available to O2 customers.
"From 1 July 2013, we will no longer offer access to BT Openzone wi-fi hotspots to our customers," the mobile phone giant said in a statement.
"We'll continue to extend the reach and scale of O2 wi-fi through exciting partnerships with venues including O2 shops, restaurants, retail outlets and outdoor and indoor locations across the UK."
However, Kester Mann, senior analyst at CCS Insight, told the BBC that the announcement of the end of the deal would hit many people on the O2 network. "The reduction in the number of hotspots is a blow to O2 customers," he said.