Originally, Chell was a test subject performing tests for Aperture Science, which was being overviewed by GLaDOS, an artificially intelligent computer system. Chell destroyed GLaDOS in her efforts to escape but was wounded, and an unseen figure with a robotic voice dragged her back inside.
In Portal 2, an unknown number of years after the events of Portal, Wheatley awoke Chell from hibernation in an attempt to escape the facility. After accidentally activating GLaDOS, the two defeated her when Chell removed her from her mainframe and replaced her with Wheatley. However, after relishing in his newfound powers, Wheatley turned on Chell and inadvertently trapped her in the older sealed testing chambers. Due to his lower intelligence, Wheatley found himself unable to properly manage the systems necessary to operate the facility without destroying it. Chell and GLaDOS thus teamed together to put GLaDOS back in charge of the facility, removing Wheatley and trapping him in space after he was sucked through a portal that Chell shot at the Moon. Rather then make another fruitless attempt to destroy her, GLaDOS elected to release Chell from the facility.