Petr Hejma began his senior club career with Dukla Litoměřice in 1963 but moved to HC Dukla Jihlava in 1964. He then played three seasons with ČKD Praha, making the Czechoslovak team for the 1968 Winter Olympics, and helping them win a silver medal. By then he had 35 caps, but he would never again play internationally for his native country. In an exhibition game on 15 September 1968, between ČKD Praha and Düsseldorfer EC, Hejma defected to West Germany.
The Czechoslovakian Ice Hockey Federation asked the International Ice Hockey Federation (IIHF) to impose an 18-month suspension on Hejma for defecting and he did not play competitively at all in 1968-70. Hejma played most of the rest of his career, through 1981, with Düsseldorfer EC, but spent 1976-78 with Krefelder EV. With Düsseldorf he played in 359 matches, scoring 240 goals and 514 points as a forward. In 1972 he was selected by the World Hockey Association’s (WHA) Calgary Broncos, who soon became the Cleveland Crusaders, in the General Player Draft, but he never played professionally in North America.