Slang meaning "rebuke, blame, responsibility" is from 1777; specific meaning "criminal indictment" (cf. rap sheet, 1960) is from 1903. To beat the rap is from 1927. Meaning "music with improvised words" first in New York City slang, 1979 (see rap (v.2)).