The spelling without the [i] was present in Middle English, and then a more general shift towards dropping the [i] occurs in the 17th and 18th centuries. Samuel Johnson treats the older spelling as an archaism.
Here are common forms of the Middle English word ordinaunce (Middle English Dictionary):
ordinaunce n. Also ordinauns(e, ordenaunce, ordenauns, ordinawuns, ordonaunce, ordonans, ordrenance & ordnaunce, ordnanse & ordeinaunce & (error) ordyunce.
With multiple forms (in bold) the vowel between [d] and [n] disappears. These are not the most common spelling, but they show what is to come - for some uses of ordinance/ordnance, speakers and writers were already dropping the middle vowel.
By the 15th century, ordinaunce referred to artillery provisions and other military equipment (def 11 of the MED entry).
Early Lexicons: Ordinance
In early lexicons, the word is at first recorded as ordinance and other variants. Here is Thomas Elyot in the Bibliotheca Eliotae (1542):
Instrumentum, an instrument or toole. also ordinance of warre, vessell, and all necessaries of householde and husbandry. somtyme it sygnifieth a deede or charter concernyng lande, dettes, or couenauntes.
And John Withals in A Short Dictionary for Young Beginners (1556):
Armamentaria, modo nauium instrumenta, vel munimenta, modo armorum repositoria significant. Item conditorium, a place wherin ordinaunce for warre is kept.
This is frequent in lexicons even to the 18th century. Here is Nathan Bailey, Univesal Etymological English Dictionary (1737):
ARTILLERY[artillerie, F.] the heavy equipage of war, comprehending all sorts of great fire arms, with what belongs to them, as cannons, mortars, &c. the same that is called ordinance.
Early Lexicons: Shifting to Ordnance
The spelling begins to shift in lexicons at the start of the 17th century. Jacob Cornelissoon van Neck's book The Journal or Daily Register of the Voyage from Amsterdam the First Day of March, 1598 (1601) contains a glossary translating from an East Indian language with the following:
A great peece of Ordnance
Randle Cotgrave uses the spelling repeatedly in his A Dictionary of the French and English Tongues (1611), whenever a French word could use it. For instance:
Canonniere: f. A loope-hole, or port-hole, for a peece of Ordnance; also, a Potgunne.
It occurs very frequently thereafter, especially in reference to armaments and occasionally in other uses. Back to Nathan Bailey (1737), he uses ordnance as well, in a context very close to that he uses ordinance (artillery):
Train of ARTILLERY,a set or number of pieces of ordnance, mounted on carriages with all their furniture, fit for marching.
A generation later, Samuel Johnson includes a note to his entry for ordnance that either tries to kill the older spelling or notes its obsolescence, depending on your perspective on his Dictionary of the English Language (1755):
O’RDNANCE. n. s. [This was anciently written more frequently ordinance; but ordnance is used for distinction.] Cannon; great guns. Have I not heard great ordnance in the field? And heav'n's artillery thunder in the skies? Shakesp. When a ship seels or rolls in foul weather, the breaking loose of ordnance is a thing very dangerous. Raleigh. There are examples now of wounded persons that have roared for anguish and torment at the discharge of ordnance, though at a very great distance. Bentley's Serm.
Note that he also includes an entry for ordinance, which he distinguishes semantically while also noting the change in spelling when it comes to artillery:
O’RDINANCE. n. s. [ordonnance, French.] 1. Law; rule; prescript. It seemeth hard to plant any sound ordinance, or reduce them to a civil government; since all their ill customs are permitted unto them. Spenser on Ireland. Let Richard and Elizabeth, The true succeeders of each royal house, By God's fair ordinance conjoin together! Shakesp. 2. Observance commanded. One ordinance ought not to exclude the other, much less to disparage the other, and least of all to undervalue that which is the most eminent. Taylor. 3. Appointment. Things created to shew bare heads, When one but of my ordinance stood up, To speak of peace or war. Shakesp. Coriolanus. 4. A cannon. It is now generally written for distinction ordnance; its derivation is not certain. Caves and womby vaultages of France, Shall chide your trespass and return your mock, In second accent to his ordinance. Shakesp. Hen. V.
So by this time, the shift is essentially complete. By the time Noah Webster gets around to his dictionary (1828), this is all he has to say on ordnance:
ORD'NANCE, noun [from ordinance.] Cannon or great guns, mortars and howitzers; artillery.
Ordinance has its own entry and has effectively become its own word form. As Johnson suggested, the spelling differs for distinction, or to distinguish the two words and meanings.