The costs switched the Swiss bank's third-quarter results into a 2.2-billion franc ($2.36-billion) net loss compared to the 1 billion net profit it had reported during the July-September period last year.
"This decision has been a difficult one, particularly in a business such as ours that is all about its people," UBS chief executive Sergio Ermotti said in a statement, referring to the job cuts.
"Some reductions will result from natural attrition and we will take whatever measures we can to mitigate the overall effect," he said, vowing that "our people will be supported and treated with care."
The Zurich-based bank said that cuts in its overall staff numbers to about 54,000 by 2015 was a necessary part of a restructuring of its investment bank, including shedding some of its high-risk activities and basically withdrawing from the fixed income business which had burdened it with catastrophic losses during the 2008 "subprime" crisis.
UBS, which counted nearly 64,000 employees at the end of September, said the restructuring would save 5.4 billion francs ($5.8 billion) over the next three years.
UBS said in its earning statement it had taken a one-time charge of 3.1 billion francs linked to the restructuring and a debt-related charge of 863 million.
Before taxes, UBS said it was hit by a loss of 2.5 billion francs, but that adjusted for the impairment losses and a restructuring provision, it had registered a pre-tax profit of 1.4 billion.
Ermotti hailed the company's earnings, stressing that all the bank's activities had "delivered improved profitability in the third quarter," and that it was rolling out its strategy "well ahead of schedule."
"We are confident that the actions we are taking now will ensure the firm's long-term success in the fundamentally changed regulatory and economic environment and will deliver sustainable returns for our shareholders going forward," Ermotti said in a joint comment with UBS chairman Axel Weber.
The bank said it was withdrawing from lines of business "that do not meet their cost of capital sustainably or are in areas with high operational complexity or long tail risks likely to weigh on future returns."
UBS finance chief Tom Naratil told a conference call on Tuesday that the bank had "delivered a solid performance despite a challenging environment."
The bank expected to have to pay a further amount of about 500 million Swiss francs in restructuring charges in the fourth quarter, which is also expected to be in the red.
But Naratil stressed that despite the difficult economic environment, the bank had managed to raise a "record" amount of fresh capital, raising 7.7 billion francs from the Asia Pacific region, emerging markets and very wealthy clients.
In the fourth quarter, the bank said it expected to pull in more fresh capital despite the continued difficult climate.
As for dividend payments, which UBS started doing again last year after a four-year freeze, Naratil said "we continue to accrue for a dividend" in 2012, but did not specify if the bank would hand out some of its profits this year to shareholders.