A new law aimed at cracking down on so-called puppy farms in England is being presented to Parliament on Monday.
Known as Lucy's Law, it will ban the sale of kittens and puppies from third parties from spring 2020, making buyers deal with breeders directly.
Environment Secretary Michael Gove said the new rules would give animals "the best possible start in life".
The RSPCA said it was "absolutely thrilled" with the legislation - but stressed it required enforcement.
The new law would require animals to be born and reared in a safe environment, with their mother, and to be sold from their place of birth.
The rules, which will apply to England, are also designed to deter smugglers who abuse the Pet Travel Scheme to bring young animals into the UK to be sold.
Named after Lucy, a Cavalier King Charles Spaniel who died in 2016 after being poorly treated on a puppy farm, the ban is scheduled to come into force on 6 April next year, the Department for Environment, Food and Rural Affairs said.
Marc Abraham, Lucy's Law campaigner and founder of Pup Aid, said: "I'm absolutely thrilled that Lucy's Law is now being laid in Parliament and will come into effect from April 2020.
"Lucy's Law is named after one of the sweetest, bravest dogs I've ever known, and is a fitting tribute to all the victims of the cruel third-party puppy trade, both past and present."
But Paula Boyden, veterinary director at Dogs Trust, the UK's largest dog welfare charity, urged the government to go further.
She said: "We would like to see additional measures introduced to ensure the ban is as robust as possible.
"There is time before April 2020 for the government to consider regulation of re-homing organisations and sanctuaries, ensure full traceability of all puppies sold, and strengthening of the pet travel scheme."
When Lucy was rescued from a Welsh puppy farm five years ago, she was suffering.
The Cavalier King Charles Spaniel's hips had fused together, she had a curved spine, bald patches and epilepsy after years of mistreatment.
She'd been kept in a cage much of her life and was no longer able to have puppies.
But the five-year-old went on to be re-homed by Lisa Garner - and now her story is helping to change the law.
Pet shops and dealers in England will be banned from selling puppies and kittens under government plans.
It's after her story was the focus of the Lucy's Law campaign - which has been calling for the ban to be implemented.
"It was clear from her physical condition that she had been subjected to appalling conditions," said Lisa in an interview with the Mirror.
"However, with lots of patience, Lucy went on to enjoy a full, albeit far too short life, filled with happiness."
Lucy had three years of love before she died in 2016.
It spurred Lisa on to launch a campaign to prevent poor treatment of dogs in puppy farming.
The ban has been backed by celebrities such as Ricky Gervais.
"Her body was broken when she was rescued at five years old," vet Marc Abraham, who also helped launch the campaign, told BBC 5 Live.
"She had three years in freedom, being pampered and having a normal life as a pet.
"We launched Lucy's Law a year after her passing as a tribute to her and all the breeding dogs that are hidden from the public.
Dogs like Lucy are often kept by breeders to produce litters of puppies, which are then taken from their mothers at four or five weeks old, according to Marc.
The government's decision is a triumph for Lucy, Lisa and Marc and has been welcomed by animal welfare charities.
Lucy's story is not uncommon.
In 2015, one family in Sussex were tricked by someone selling what they believed to be a nine-week-old crossbreed puppy on a website.
They spent £470 on Max, a "cavapoo" (Cavalier King Charles mixed with a poodle) but which turned out to be a different mix entirely.
"We were so excited to have him home but, just 17 hours after he arrived, it all went wrong," said Rebecca Reed.
Max wouldn't eat but was drinking constantly and Rebecca was called home from work by her husband when the dog became seriously ill.
"He was like a wet blanket on the floor. He couldn't even lift his head, he was so weak. It was heartbreaking," Rebecca said.
A vet diagnosed Max with megaesophagus - a condition where dogs are unable to get food into their stomach.
Rebecca tried to contact the seller to find out if any other puppies had the condition, but her calls were ignored.
She had to change her working hours to feed Max liquidised food and her husband built him a special chair to help him digest what he had eaten.
The family estimate caring for Max has cost them £5,000 because they had bought him from a seller who they say lied about the dog's age, health and vaccination history.
"We believe that all puppies and kittens should be born and reared in a suitable environment, with their mother, and should be sold directly from their place of birth," said RSPCA animal welfare expert Lisa Hens.
"We hope this move will offer better protection to puppies and their parents and reduce the number of families duped by rogue dealers in this illegal multi-million-pound industry."