Crews from Leyland were called to a property in Leadale at around 11.30am on May 22 after the two-year-old was unable to unlock the door in the bathroom.
A spokesman for Lancashire fire services said: "A little girl became trapped in her bathroom after she locked the door. The lock was faulty and her carer was unable to open the door using the emergency access from outside.
"The little girl was in a lot of distress by the time we arrived but thankfully we were able to free her relatively quickly using our 'methods of entry kit'".
The girl was unharmed during the incident.