Obama collected 57 percent of the vote, compared with Republican presidential nominee Mitt Romney's 42 percent, with almost all votes counted. Connecticut has seven electoral votes.
Murphy defeated McMahon 54 percent to 44 percent. Libertarian Party nominee Paul Passarelli got 2 percent of the vote, results showed.
McMahon, who developed the WWE with her husband, Vince McMahon, had spent $43 million of her own money to recast her image after spending $50 million of her own money and losing badly in the 2010 Senate race.
"Tonight we proved that what matters most in life is the measure of your ideas, the measure of your determination and the measure of your friends, not the measure of your wallet," the Hartford Courant quoted Murphy as telling jubilant supporters in Hartford. "I am proud to be your next U.S. senator."
Murphy's win prevents Republicans from picking up the seat being vacated by independent Sen. Joseph Lieberman.
Polls had indicated the Murphy-McMahon race would be tight.
In a key House race, Elizabeth Esty, a former state representative, defeated Republican state Sen. Andrew Roraback in the 5th Congressional District.
Police: Sword-wielding man demanded free tacos
Campus cop fatally shoots Texas student during traffic stop