early 15c., diversioun, "process of diverting," from Medieval Latin diversionem (nominative diversio), noun of action from past-participle stem of Latin divertere (see divert).
Meaning "act of turning aside from a course of action" is from c. 1600; that of "act of diverting (something) from its due or ordinary course" is from 1620s. Military meaning "act of drawing the attention and force of the enemy from the point where the principal attack is to be made" is from 1640s.
Sense of "amusement, entertainment" is attested by 1640s, on the notion of "that which diverts the mind." Hence, divertimento (1823), from the Italian form; originally "a musical composition designed primarily for entertainment."