The 31-year-old addressed the subject after fans asked why she no longer shared photos of the pooch, who used to make a regular appearance on her Instagram feed.
She said she was forced to rehome Lamby, who suffered abuse as a puppy, due to his “challenging behaviour and aggression”.
He is now living in a professional facility in Los Angeles, specialising in trauma.
Fans have praised the actor for “doing what was right”.
On Wednesday 21 June, Dunham posted a photo of herself cuddling Lamby and explained why she had to give up her pooch last March.
“After four years of challenging behaviour and aggression that could not be treated with training or medication or consistent loving dog ownership, Lamby went to live at an amazing professional facility in Los Angeles,” she wrote.
“Lamby suffered terrible abuse as a pup that made having him in a typical home environment dangerous to him and others - we needed to be responsible to ourselves, our neighbours and especially our beloved boy.”
She continued: “Jack and I will miss him forever but sometimes when you love something you have to let it go (especially when it requires tetanus shots and stitches).
“Someday I’ll really write about the pain and relief of letting Lamby go off and really be Lamby, biting and peeing in his own mouth and all.”
She said the experience was “heartbreaking” and there were many lessons she learned along the way, “about forgiving myself and loving with an open palm and giving in to a larger plan”.
Addressing her fans, she said anyone in a similar situation should know it’s possible to responsibly rehome a rescue dog rather than sending them back to the shelter system.
“It can require patience, diligence and often a financial contribution but there are solutions that leave everyone happy and safe,” she explained.
“You will always have been your dog’s first stop outside [of] shelter life and that’s beautiful.”