A spokesman told the Pittsburgh Post-Gazette O'Connor's family was with him when he died at the University of Pittsburgh Medical Center Shadyside Hospital.
City Council President Luke Ravenstahl was sworn in as mayor at 10:30 p.m., less than two hours after O'Connor's death.
O'Connor won the mayor's race last November in his third try for the office. The newspaper characterized him as an energetic executive, leading a campaign to clean up the city in time for the Major League All-Star Game in July.
Shortly before the All-Star break, he was diagnosed with cancer. He spent the day of the game getting his first chemotherapy treatment.
O'Connor got into politics by running for the city council at age 45, after five years as a steel worker at Jones & Laughlin and a career as an executive with a restaurant company.
Millions of Getty images now available for free via embed tool
Ray Liotta sues skin care company over use of likeness