Kayky, who is 22 years old, joined City in April 2021 from Fluminense.
During his time with City, he spent most of his years away on loan to gain experience.
As Bahia is part of the City Football Group network, Kayky has now signed a permanent contract with the club.
The new deal will see Kayky play for Bahia until 2029.