The 25-year-old singer, who has been out of the spotlight in recent months, shared a picture of her in a hospital bed next to her friend and donor, Francia Raisa, the star of "The Secret Life of The American Girl." The singer included a touching and detailed caption about her health.
Gomez, who suffers from lupus, initially went through an exhaustive search to see if any family members were a match for her to get a new kidney, according to celebrity-news site The Blast, which first reported the story.
"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," she wrote.
The post by early Thursday had already garnered over 1.2 million likes and thousands of comments from fans and supporters.
Gomez included two close-up images of her scar from the surgery.
"I want to publicly thank my family and incredible team of doctors for everything they have done for me prior to and post-surgery," she continued. "And finally, there aren’t words to describe how I can possibly thank my beautiful friend Francia Raisa. She gave me the ultimate gift and sacrifice by donating her kidney to me. I am incredibly blessed."
Gomez told Billboard Magazine that her illness forced her to call off recent tour dates.
"I've been through stuff and I think that it's been able to test me as a person," she said.
According to the Mayo Clinic, lupus is "a chronic inflammatory disease that occurs when your body's immune system attacks your own tissues and organs." Organs that may be affected by lupus include the kidneys, heart and lungs.
ABC News chief medical correspondent Dr. Jennifer Ashton said a kidney transplant is a straightforward surgery but is still a major operation that requires medical attention throughout recovery.
The usual recovery time in a hospital following such a transplant is three to seven days, Ashton said, although the donor may be able to go home a little sooner. "The recipient in this case, Selena Gomez, has to be monitored very closely for rejection" of the new kidney.
"The chances of rejection are less when you get a kidney from a living donor, but it's still a possibility and the survival rates are excellent," Ashton added.