The 21-year-old, who had a trial with Bidvest Wits last year, recently won the SportPesa Premier League's Golden Boot with 17 goals for Kariobangi Sharks in his homeland.
City said on Twitter: "Cape Town City is delighted to announce the acquisition of 21 year old Kenyan international striker, and African top goalscorer of the year - Masoud Juma!
"The undisclosed transfer fee, was accepted by Juma's club Kariobangi Sharks in theahead of bids from Europe, Egypt, and South Africa - and the club is thrilled that Juma in the end decided to join Cape Town City.
"Juma will receive his work permit this week and fly to Cape Town on JAN8 where he will meet his new teammates and begin preparing for CTCFC's domestic and CAF campaigns."
Juma's arrival in the Mother City will help offset the departure of fellow striker Lehlohonolo Majoro to Wits.
The Citizens have also lost the services of star winger Aubrey Ngoma to title rivals Mamelodi Sundowns, while assistant coaches Ian Taylor and Calvin Marlin have left for China and Ajax Cape Town respectively.
However, the club have brought in defender Kwanda Mngonyama from the Brazilians; have their eye on Kaizer Chiefs goalkeeper Brilliant Khuzwayo, and are determined to retain captain Robyn Johannes.