Petrovic was drafted by the Red Deer Rebels in the second round of the 2007 Western Hockey League Bantam Draft. Prior to being drafted, he had been playing midget hockey in Edmonton. He played his first full WHL season in 2008–2009, recording 13 points in 66 games. Leading up to the 2010 NHL Entry Draft, Petrovic was ranked 29th among North American skaters by the NHL Central Scouting Bureau, and the Florida Panthers ultimately drafted Petrovic in the second round, 36th overall. Petrovic played his entire junior career with the Rebels, turning pro for good after the 2011–2012 WHL season.
Professional
Florida Panthers
On April 18, 2011, Florida signed Petrovic to a three-year, entry-level professional contract. He made his professional debut in the American Hockey League playoffs with the San Antonio Rampage after the 2011–12 season. Petrovic began the 2012–13 season with the Rampage in the AHL, but was called up to the Panthers in April 2013. On April 18, he made his NHL debut against the New York Rangers, playing in six games at the NHL level near the end of the season. He did not score any points, however, though he did record 25 penalty minutes. Petrovic attended training camp with the Panthers prior to the 2013–14 season, and was expected to stick with the club for the entire season, but he was one of the earliest cuts and returned to San Antonio of the AHL. On January 26, 2016, Petrovic scored his first NHL goal against the Toronto Maple Leafs. Two weeks later on February 9 in a 7–4 Panthers win over the Buffalo Sabres at First Niagara Center, he picked up a goal and an assist but fought Evander Kane three times. The three fights by the same two adversaries in a single NHL match was the first such occurrence since Jody Shelley and Bob Probert did it on January 10, 2002.
During his seventh season with the Panthers in 2018–19, having slowed his production and effectiveness on the third-pairing with Florida producing just 1 assist in 26 games, Petrovic was traded to the Edmonton Oilers in exchange for Chris Wideman and a conditional third-round pick in 2019 on December 30, 2018.
Boston Bruins
In the 2019 offseason, as an unrestricted free agent, Petrovic signed a professional tryout contract with the Boston Bruins. After a successful camp with the Bruins, on September 26, 2019, Petrovic was signed to a one-year, two-way contract by the Bruins and assigned to AHL affiliate, the Providence Bruins.
Personal life
As a child, Petrovic's favourite player was Mike Modano and his favourite team was the Dallas Stars. He models his game after defenceman Chris Pronger. He is of Serbian descent.