"agreement in terminal sounds of words or metrical lines," a 16c. attempt to restore a classical spelling to Middle English ryme, rime (c. 1200) "measure, meter, rhythm," later "rhymed verse" (mid-13c.), from Old French rime (fem.), which is related to Old Provençal rim (masc.), earlier *ritme, from Latin rithmus, from Greek rhythmos "measured flow or movement, rhythm; proportion, symmetry; arrangement, order; form, shape, wise, manner; soul, disposition," related to rhein "to flow" (from PIE root *sreu- "to flow").
The persistence of rime, the older form of the word, perhaps is due to popular association with Old English rim "number" (from PIE root *re- "to reason, count"). The intermediate form rhime was frequent until late 18c.
In Medieval Latin, rithmus was used for accentual, as opposed to quantitative, verse, and accentual verse usually was rhymed, hence the sense shift. In prosody, specifically the quality of agreement in end-sounds such that the last stressed vowel, and any sounds after it, are the same, and preceding sounds differ.
Verse was invented as an aid to memory. Later it was preserved to increase pleasure by the spectacle of difficulty overcome. That it should still survive in dramatic art is a vestige of barbarism. [Stendhal "de l'Amour," 1822]
The sense of "a piece of poetry in which consonance of end-sounds is observed" is from 1610s. From 1650s as "word that rhymes with another." The phrase rhyme or reason "good sense" (chiefly used in the negative) is from late 15c. (see reason (n.)). Rhyme scheme "ordered pattern of end-rhymes in metrical composition" is attested from 1931. Rhyme royal (1841) is a stanza of seven 10-syllable lines rhymed a-b-a-b-b-c-c.
a modern spelling variant or replacement of Middle English rime, rimen, from Old French rimer, from rime "verse" (see rhyme (n.)). The Middle English word is attested from late 12c. as "poetic measure, meter," from c. 1300 as "agreement in terminal sounds of words or metrical lines; a rhyming song or ballad."
The spelling shifted from mid-17c. by influence of rhythm and Latin rhythmus, from the same Greek source, and the intermediate form rhime is frequent for a while (Dryden and Steele have rhime; Pope and Scott rhyme). Related: Rhymed; rhyming; rhymer (Middle English rimer, early 15c., from rime, also from Anglo-French rimour, Old French rimeur).
The poetaster's rhyming dictionary is attested from 1775 (in John Walker's introduction to his "Dictionary of the English Language, Answering at once the Purposes of Rhyming, Spelling, and Pronouncing. On a Plan Not Hitherto Attempted"). The phrase rhyming slang for the Cockney disguised speech in which a word is replaced by a phrase which rhymes with it is attested from 1859 (the thing itself described by 1851). Especially if the rhyming word is then omitted, which seals the reference from the uninitiated: Richard, in rhyming slang "a girl" (a couple of likely Richards), short for Richard the Third, chosen to rhyme with bird "girl."