UBS neither admitted nor denied wrongdoing.
The UBS investment involved pooled securities known as collateralized debt obligations, which Wall Street banks sold at the height of the housing boom. CDOs combine slices of debt that have varying levels of risk.
When the real estate bubble burst in 2007, home values plunged and millions of people defaulted on their mortgages and lost their homes. Investors who bought the CDOs and other securities backed by mortgages lost billions. The SEC has said that inaccurate statements by banks in packaging and selling mortgage bonds contributed to the investors' losses.
"UBS is pleased to put this investigation behind us, which involved a legacy business that was closed almost five years ago," the bank said in a statement Tuesday. "We believe this settlement marks the conclusion of all SEC investigations relating to UBS's structuring and marketing of CDOs backed by residential mortgage-backed securities."
The settlement with UBS was the latest in a series of SEC actions regarding Wall Street firms' conduct in the years preceding the 2008 crisis. The roughly $50 million that UBS is paying is smaller than most of the previous accords with other big banks.
Goldman Sachs agreed in July 2010 to pay $550 million to settle similar SEC charges of misleading buyers of a complex mortgage investment. JPMorgan, the largest U.S. bank by assets, settled similar charges in June 2011 by agreeing to pay $153.6 million, and reached another agreement over mortgage bonds for $296.9 million last November.
Credit Suisse, Switzerland's second-largest bank, agreed to pay $120 million.