Evidence presented by OED suggests (but only suggests) that development of the figurative sense of 'to doctor', that is, "to treat so as to alter the appearance, flavour, or character of; to disguise, falsify, tamper with, adulterate, sophisticate, 'cook'" (OED), attested from before 1777 in the sense of 'to disguise',
I wish we had time to doctor his face: Against their next meeting, I will do it myself; I will manage that matter, I warrant: I learnt the art last autumn of a parcel of strollers....
The Cozeners, Samuel Foote [died 1777], 1778
developed from earlier slang or colloquial use of the noun in the sense of
Something used to ‘doctor’ or adulterate food or drink; e.g. a liquor mixed with inferior wine to make it more palatable, or with light-coloured wine (as sherry) to darken it; hence, a name for brown sherry.
The noun sense is attested from 1770 in Placid Man, &c, by Charles Jenner:
Sir George...was happy if he happened to drink his coffee in the same box with a sensible man...but the governor was as happy if he drank his Doctor next to a man who talked to him upon any thing....
In context, the first attestation given by OED for the noun sense is not clearly either use in the sense of "milk and water, with a little rum, and some nutmeg" (A Classical Dictionary of the Vulgar Tongue, Francis Grose, 1785) or use in the sense of "a composition used by distillers, to make spirits appear stronger than they really are, or, in their phrase, better proof" (op. cit., the second attestation of the noun sense from OED).
While the noun definition supplied by OED strongly suggests they intend the latter definition given by Grose in 1785 ("a composition used...to make spirits appear stronger") should be applied to the sense used in 1770, the context of that 1770 use rather more supports that the sense corresponds to the former of Grose's definitions, that is, "milk and water, with a little rum, and some nutmeg", which would make for a weaker link from this sense of the noun to the development of the verb in the general sense of 'to disguise or falsify'.
Altogether, the evidence begs the question: how did the slang or colloquial noun sense develop from earlier use? That seems adequately answered by the simple observation that, like 'doctored' human beings, 'doctored' food or drink at least for a time appeared to be better or stronger.