In the liver, glycogen plays a crucial role in maintaining blood glucose levels. During fasting or between meals, glycogen stored in the liver is broken down into glucose and released into the bloodstream to ensure a constant supply of glucose to tissues, especially the brain. This process is regulated by hormones such as glucagon and epinephrine.