The bulk of profits came from the bank's investment banking arm, Barclays Capital, which made £3.4bn.
Barclays also said it lent £18bn to UK households and businesses over the six month period.
Barclays chief executive John Varley said his bank had performed well in difficult market conditions.
"Against the backdrop of of subdued economic and market activity and the sovereign debt storm of the second quarter, we have delivered good growth in income and profits."
And Varley added: "We recognise our wider social responsibility as an enabler of economic growth and prosperity, and our actions are - and will continue to be - informed by this duty.".
Gross new lending totalled £18bn, Barclays said, plus the £7bn of lending taken on with the acquisition of Standard Life Bank at the beginning of the year.
Barclays was heavily reliant on investment banking in the first six months of the year, with Barclays Capital's £3.4bn accounting for more than 80% of overall profits.
That included a one-off £851m gain on the value of its own credit. Without it, BarCap came in at £2.55bn.
Retail banking profits came in at £901m, up from £845m on last year. Meanwhile profits at Barclaycard fell 15% to £317m.
Losses on bad debts fell 32% to just over £3bn, though the bank said impairment charges in Spain had increased.
Commenting on the results, Sky's City editor Mark Kleinman said: "These numbers are pretty good - in line with most of the UK banks that have reported.
"Already during this busy week of bank results, profits are ahead of expectations.
"These numbers from Barclays take the profit earned by UK banks to around £12bn in the first six months of 2010."
But the BBC's business editor Robert Peston said the fall in impairments would have had a significant impact on profits.
"With substantial profits of £3.9bn it's very difficult to argue that Barclays is doing badly," he said.
"But if you strip out the fall in the charge for bad debts, it's difficult to see that in underlying operational terms there's much growth.
"But we are living in a world of low growth and, in pure income terms, this bank is not doing much better than the wider British economy."