The ciliary transition zone (TZ) is a complex structure found at the cilia base. Defects in TZ assembly are associated with human ciliopathies. In most eukaryotes, three protein complexes (CEP290, NPHP, and MKS) cooperate to build the TZ. We show that in Drosophila melanogaster, mild TZ defects are observed in the absence of MKS components. In contrast, Cby and Azi1 cooperate to build the TZ by acting upstream of Cep290 and MKS components. Without Cby and Azi1, centrioles fail to form the TZ, precluding sensory cilia assembly, and no ciliary membrane cap associated with sperm ciliogenesis is made. This ciliary cap is critical to recruit the tubulin-depolymerizing kinesin Klp59D, required for regulation of axonemal growth. Our results show that Drosophila TZ assembly in sensory neurons and male germ cells involves cooperative actions of Cby and Dila. They further reveal that temporal control of membrane cap assembly by TZ components and microtubule elongation by kinesin-13 is required for axoneme formation in male germ cells.