The main function of liver within the digestive system is to absorb nutrients from the small intestine. Bile from the liver secreted into the small intestine also plays an important role in digesting fat. The liver also detoxifies potentially harmful chemicals. It breaks down and secretes many drugs.