The bank, founded in 1741, said it had taken the radical step "as a consequence of the increasingly threatening situation surrounding Wegelin & Co Private Bankers in the US tax dispute".
Most of its clients and 700 staff will be transferred to Notenstein Private Bank Ltd, which will become a 100 percent subsidiary of Raiffeisen for an undisclosed amount, Wegelin said.
"I never could have imagined that we, as owners of Switzerland's oldest bank, would ever have considered selling," said senior managing partner Konrad Hummler.
"This extraordinarily difficult situation and threat to the bank brought about by the legal dispute with the US has forced me and my longtime associate Otto Bruderer to take this extremely painful step together with the other managing partners."
Raiffeisen, Switzerland's largest retail bank, said the acquisition of the private bank was an "excellent opportunity" to strengthen its position in the wealth management sector.
US tax officials have been putting pressure on Swiss banks to release information about clients who are US nationals and who might be evading taxes.
Earlier this month, three Wegelin bankers were charged in New York with conspiring to help US clients escape tax payments.
Hummler expressed relief that through the Raiffeisen acquisition the bank had been able to find a solution for clients and staff with a "trustworthy and competent partner".
Wegelin, headquartered in St Gallen, northeastern Switzerland, manages client assets of more than 20 billion Swiss francs ($21 billion), according to the Swiss Private Bankers Association.
The 270-year-old bank said Wegelin & Co Private Bankers would remain in existence to finalise the closure of US client relationships and continue negotiations with the US justice authorities.
Notenstein chief executive Adrian Kuenzi said the bank's urgent task was to retain the trust of clients and staff.
"At the same time, the change of ownership gives us an opportunity to reorganise and create a new structure for modern wealth management under the current regulatory requirements," he said.
The deal was authorised by the Swiss financial market supervisory authority FINMA, which said it had carefully considered risks arising from the US tax probe.
"It came to the conclusion that the measures foreseen by the parties involved take appropriate account of these risks," the Swiss regulator said in a statement.
"In particular, those employees who are especially closely connected to the US business and the managing partners with unlimited liability will remain at Bank Wegelin, and are in no way involved in the new bank."
Bank Wegelin's managing partners remain responsible for settling any possible legal or financial consequences that may arise from the US business, FINMA said.