Biofilm formation is a complex process involving various signaling pathways and changes in gene expression. Many of the sensory mechanisms and regulatory cascades involved have been defined for biofilms formed by diverse organisms attached to solid surfaces. By comparison, our knowledge of the basic mechanisms underlying the formation of biofilms at air-liquid interfaces, i.e. pellicles, is much less complete. In particular, the roles of flagella have been studied in multiple solid-surface biofilm models, but remain largely undefined for pellicles. In this work, we characterize the contributions of flagellum-based motility, chemotaxis and oxygen sensing to pellicle formation in the Gram-positive Bacillus subtilis. We confirm that flagellum-based motility is involved in, but is not absolutely essential for, B. subtilis pellicle formation. Further, we show that flagellum-based motility, chemotaxis, and oxygen sensing are important for successful competition during B. subtilis pellicle formation. We report that flagellum-based motility similarly contributes to pellicle formation and fitness in competition assays in the Gram-negative Pseudomonas aeruginosa. Time-lapse imaging of static liquid cultures demonstrates that in both B. subtilis and P. aeruginosa, a turbulent flow forms in the tube and a zone of clearing appears below the air-liquid interface just before the formation of the pellicle, but only in strains that have flagella.