The Reds met the Guinea international's £48 million release clause and have handed him a five-year contract, effective from July 2018.
“I am delighted that an agreement has been reached which will allow me to join Liverpool Football Club next summer, when I will become part of a project that excites me greatly,” Keita, 22, told Liverpool's website.
“My commitment to RBL remains absolute for the remainder of my time at the club. I have given my all every time I have worn the shirt – that will be the case until the final whistle, in my final appearance.
“Having my future resolved means I can now focus on helping RBL achieve great things this season. Until I join my new club, next summer, I will remain an interested supporter from a distance.”
Keita joined Leipzig from Red Bull Salzburg in 2016 and scored eight goals in 31 Bundesliga appearances last term.