The danger came to light in June 2010 when the owner of a flat in Glenkirk Drive in the Drumchapel area of Glasgow became concerned about headaches her 10-year-old son was having.
The 30-year-old mother suspected the gas fire in her living room was responsible and asked a friend, a gas engineer, to check it. He found the space behind the fire was filled with debris and that the chimney had been demolished.
The Health and Safety Executive (HSE) was notified and began investigating.
The blockage of debris and removal of the chimney meant carbon monoxide produced whenever the gas fire was used spilled back into the living room, the HSE said.
It was established that contractor Morris and Spottiswood carried out renovation work on the block of flats, starting in September 2008, including the removal of redundant chimneys to reduce its maintenance costs.
Morris and Spottiswood subcontracted the work to remove the chimneys but failed to provide sufficient direction and supervision to the subcontractor, HSE said.
A Morris and Spottiswood site foreman visited the flat in 2009 and the fire was mistakenly recorded as an electric fire, and the chimney was removed without informing the owners of the flat, HSE said.
At Glasgow Sheriff Court, the firm pled guilty to breaching section 3(1) of the Health and Safety at Work Act, which states: "It shall be the duty of every employer to conduct his undertaking in such a way as to ensure, so far as is reasonably practicable, that persons not in his employment who may be affected thereby are not thereby exposed to risks to their health or safety."
The company was fined £60,000.
HSE inspector Helen Diamond said: "This was, for the family, a potentially fatal combination of circumstances. But thankfully it appears they did not suffer a high degree of exposure.
"It was Morris and Spottiswood Ltd's decision to remove the chimney at this property, based on checks made by a site supervisor who had no specific trade.
"A young family was needlessly put at risk because the company fell considerably short in its duties as principal contractor. It failed to ensure a competent person was employed to determine whether properties had a gas or electric fire and then failed to provide sufficient information, instruction, training and supervision to the subcontractor."