Whole-organism performance in relation to ornamentation is often examined to evaluate the cost of ornamentation, assuming that high performance is favored by viability selection. These studies typically conduct experimental manipulations of ornamentation, which potentially impair phenotypic integration with compensatory traits, making it difficult to clarify performance function of ornamentation. Here, we adopted an alternative approach, macroevolutionary analysis, and examined the flight performance of swallows (Aves: Hirundininae) in relation to tail fork depth to clarify evolutionary force favoring the ornamentation. We found that a measure of flight performance, presence of notable non-straight flight including maneuvering, turning, and swerving, peaked at intermediate fork depth, which appear to support viability selection for moderately forked tails. However, the quadratic relationship was found only in males, and hirundines with high opportunities for extrapair mating had higher probability of non-straight flight, indicating the importance of sexual selection. The current findings indicate that the flight performance of hirundines evolved through sexual selection, at least partially; thus, its relationship with forked tail might not clarify the viability cost of ornamentation. Whole-organism performance should be carefully interpreted when deducing the cost function, and thus, the evolutionary driver, of ornamentation.