Machek was born in
Hradec Králové,
Kingdom of Bohemia, back then part of
Austro-Hungary, nowadays of
Czech Republic, Machek started playing football in the local club,
FC Hradec Králové debuting for the first team at age of 16. He received a message from his friend and compatriot, Eduard Mifek, who was already playing football in Serbia; Mifek invited him to become a player of a newly founded club,
SK Velika Srbija. Machek met an envoy from the club, Serbian footballer Josip Furjanović, in
Vienna, who presented him the proposal, and Machek accepted. He arrived in
Belgrade, capital of
Kingdom of Serbia, in 1913 at the age of 18. Besides Machek, Mifek and Perovický were also Czechs. Machek immediately impressed the others with his excellent technique, dribbling and strong shot and, besides being a player, he was also pointed out as team coach. In 1914, in addition to being a coach/player of Velika Srbija, he took charge as coach of another Belgrade club, SK Srpski mač, which became the unofficial champions of Serbia that year. That same year, he played with Velika Srbija for the
Serbian Olympic Cup. The final was played between Velika Srbija and Šumadija, and Velika Srbija won 3-1, with Mahek scoring two of the three goals of his team. All Serbian clubs ceased their activities with the start of the
First World War on 15 July 1914, and most players were conscripted to the
Serbian Army. Most of the elder players who were not conscripted, along with the foreign ones, left Belgrade and moved south to the interior of
Serbia. Machek, along with his compatriots Mifek and Petrovický, were taken by Velika Srbija president
Danilo Stojanović to play in
Kragujevac with Šumadija, which was another club that Stojadinović had founded earlier. Machek and Petrovický later played at
FK Morava Ćuprija, which had just been founded by other players from Belgrade that took refuge there during the war. At the end of the war in 1918, the
Kingdom of Serbs, Croats and Slovenes was formed, renamed to Yugoslavia in 1929. The clubs were restored, and Ajojz Mahek rejoined Velika Srbija, now renamed to
SK Jugoslavija. He would play with SK Jugoslavija until 1926. Along with his compatriot Karel Blaha as SK Jugoslavija coach, he went on to be part of the
Yugoslav First League championship winning squads in
1924 and
1925; the two national championships crowned his playing career. He moved to
SK Soko in 1927, and lived in Yugoslavia for the rest of his life. ==Honours==