Nigel Railton, chief executive of Camelot Global, will head up UK operations on an interim basis while the firm seeks a permanent replacement.
Duncan, who has been with Camelot for six years, will work with Railton over the coming months to help ensure a smooth transition.
In addition, Duncan will continue to represent Camelot UK on the committees of the European Lotteries Association, World Lottery Association and the EuroMillions Lottery Operators Board until he steps down in the summer.
“It has been a great privilege to have led Camelot and the National Lottery through an exciting period,” Duncan said.
“I’m proud that total returns to good causes during the last six years exceeded £10 billion (€11.8 billion/$12.9 billion), an increase of 25% or nearly £2 billion compared with the previous six years.
“I believe that the purpose at the heart of the National Lottery has never been stronger, changing lives by creating a millionaire nearly every day whilst returning more than £30 million to good causes every week.”
Camelot chairman Jo Taylor added: “Andy has achieved a tremendous amount on behalf of National Lottery players, winners and the good causes the National Lottery supports.
“We thank him for his contribution to Camelot and the National Lottery and wish him well for the future.”