The 200-year-old building, which is close to Borough Market in South London, had been valued by Southwark Council at £2.3 million before going under the hammer.
The Grade II-listed property, which includes two large family homes, was auctioned by Savills to raise money for social housing in the area.
The auctioneers said bidding started at £2 million and within five minutes had long surpassed the reserve price, with bids going up by tens of thousands at a time.
Chris Coleman-Smith, head of auctions at Savills and the auctioneer who looked after the sale, said: "There was a really good cross-section of people bidding, with eight or more people having a crack at it."
Savills could not reveal the identity of the winning bidder, adding that they wanted to "remain very private about who they are", but confirmed the property will probably be used residentially.
The 5,500sq ft building covers numbers 21 and 23 Park Street in Borough and could make two family homes or be divided up into flats.
He said: "We have had all sorts look at it - foreign buyers including a gentleman from China, local people, owner occupiers and developers.
"There was interest in it because it is unique - we don't get many historic buildings coming up like this."
Built in around 1820, the property is believed to have originally housed managers or directors of the Anchor Brewery before being taken over by the brewer Courage, whose historic advert is still printed on the side of the building.
It was acquired by Southwark Council when the Greater London Council was wound up in 1986 and has stood empty for many years.
Councillors said the cost of repairing the Georgian building meant that auctioning it off and reinvesting the money into new housing stock made the most economic sense.
Richard Livingstone, Southwark Council's cabinet member for finance and resources, said: "The extraordinary sale of two void grade II listed houses for £2.96 million provides the opportunity to fund approximately 20 new council homes to be built to high standards and low energy costs.
"The money raised from this sale will help deliver our plan to build 11,000 new council homes in Southwark, one of the most ambitious schemes of its kind in the country."