We consider finite-dimensional complex Lie algebras admitting a periodic derivation, i.e., a nonsingular derivation which has finite multiplicative order. We show that such Lie algebras are at most two-step nilpotent and give several characterizations, such as the existence of gradings by sixth roots of unity, or the existence of a nonsingular derivation whose inverse is again a derivation. We also obtain results on the existence of periodic prederivations. In this context we study a generalization of Engel-4-Lie algebras.