"I need you," 3-year-old Leah begged mom Amber Portwood on Tuesday's episode of Teen Mom when the 22-year-old was forced to leave ex Gary Shirley's home (where Leah was staying) due to a no contact order between she and Shirley. Still, the troubled reality star eventually agreed to give Shirley full custody of their little girl later in the show.

PHOTOS: Teen Mom cast -- Where are they now?

Prior to entering an Indiana prison after forgoing a court-ordered rehab program, Portwood hatched the plan to hand over her rights so that the couple's no contact order would be lifted. "If you get custody of her no contact order is dropped and [Child Protective Services] is gone?" Portwood asked Shirley on Tuesday's show.

VIDEO: Amber admits "I don't know how to live anymore"

"Right, I'm just trying to protect her," her ex replied. "If you have no objections, then I want to get custody. I am not going to keep her from you. You are going to be able to see Leah whenever you want. She loves her mommy."

PHOTOS: Celeb mother-daughter duos

Beginning her five-year sentence June 5, Portwood has vowed to stay busy behind bars so that she'll be well equipped to care for her daughter upon release. "I'm not just going to sit [in prison]," argued the star. "I'm going to substance abuse classes. I'm going to get my GED."

Tell Us: Should the troubled Teen Mom star be allowed custody of Leah upon her release from prison?

This article originally appeared on Usmagazine.com: Amber Portwood: Should She Get Custody of Leah When She's Out of Prison?