Born in Greenock, MacGregor progressed through Greenock Morton's youth ranks to become a dependable first team player. He was a product of the Peter Weir youth side; a side that ran Celtic so close in the Scottish Youth Cup semi-final at Parkhead in 1999. David's progress was rapid and as a result he made his first team debut in season 1999/00 at 18 years old. It could be argued that his progress was somewhat accelerated by Morton's mismanagement by then owner and chairman Hugh Scott.