In 1969, Khalil was chosen to move to
Zamalek by Helmy Hussein, who was Zamalek's U-18 coach. Khalil was soon selected to play with the Zamalek U-20 team in the Youth League, which was a tournament that received great media coverage at the time for the cessation of football activity in Egypt due to the
War of Attrition. In the final match against
Al Ahly, which was broadcast on
television, Ali Khalil scored both goals for his team, and Zamalek won 2–1, and after that match, Khalil became a rising star in
Egyptian football. Khalil played for the first team in 1971, he won with Zamalek the
October League Cup title in the 1973–74 season. He also won with his team the
1977–78 Egyptian League title, and three titles of the
Egypt Cup, the first title was in
1975, and in the
1977 Egypt Cup, he scored twice in the 3–1 win over
Ismaily in the
final, and scored a goal in the
1979 Egypt Cup final where Zamalek won
Ghazl El Mahlalla by a score of 3–0. Khalil played eight
league seasons with Zamalek and scored 78 goals for his team. In his nine-seasons career, he scored a total of 94 goals for Zamalek in all competitions. Besides being a fierce goal scorer, Khalil was known for his extreme honesty and integrity, he had a famous incident in the
1978–79 league season, where he scored a goal which passed through the outer torn net and landed in the goal against Ismaily. This goal was a deciding factor in the title, but despite this he told referee of the match, Ahmed Bilal, that the ball was not a goal. As a result, the goal was canceled after it had been awarded, amid major objections from the Ismaily players and fans. Khalil was Zamalek's valuable
striker of the 1970s and the beloved player of its fans. He scored decisive goals for Zamalek which earned him nickname of "Dangerous Ali". He was the
Egyptian Premier League top scorer in 1976-77 and 1978–79. In 1980, at the height of his career, Khalil, who was 28 at the time, retired from football and became a youth coach. ==International career==