The 25-year-old shared pictures about her surgery on social media and thanked her “beautiful friend” Francia Raisa for donating her kidney.
“She gave me the ultimate gift and sacrifice by donating her kidney to me. I am incredibly blessed,” she wrote.
“I love you so much sis. Lupus continues to be very misunderstood but progress is being made.”
Gomez made the revelation on Instagram, saying: “I’m very aware some of my fans had noticed I was laying low for part of the summer and questioning why I wasn’t promoting my new music, which I was extremely proud of.
“So I found out I needed to get a kidney transplant due to my Lupus and was recovering. It was what I needed to do for my overall health.
“I honestly look forward to sharing with you, soon my journey through these past several months as I have always wanted to do with you. Until then I want to publicly thank my family and incredible team of doctors for everything they have done for me prior to and post-surgery.”
The US star revealed she was diagnosed with the autoimmune disease in 2015, and said she had “been through chemotherapy” trying to cure it.
On Thursday, she did not give details of when the operation took place, and directed her fans to the Lupus Research Alliance website.
Her friend Raisa is a celebrity herself, having appeared in the TV series The Secret Life Of The American Teenager.