Elsewhere, as a defence
In court, an alibi is a claim that the accused was in another place when the offence was committed, and so could not have done it. The same noun can name the fact of that absence, or the witness or circumstance that locates the person somewhere else. In ordinary speech the word often means any excuse offered to avoid blame. Dictionaries now record that looser sense as standard, though some commentators still prefer to keep alibi for stories that actually turn on place.
The origin of the word alibi is unusually concrete for a legal term. English did not invent it from native pieces. It borrowed a Latin adverb that already meant elsewhere, then let lawyers treat that adverb as a name for a plea.
Latin first, English later
Classical Latin alibi is an adverb: in another place, somewhere else. It appears early in literary Latin. Plautus uses it often in comedy. Later lexicographers note that Cicero has it only a couple of times, while it becomes frequent in post-Augustan prose, especially in Pliny. The core sense is spatial. Writers also used it of another passage in a book, or of another matter, so the locative could drift from geography toward otherwise.
English did not inherit the form from Old English. It is a learned borrowing. How early that borrowing is depends on the dictionary. The Oxford English Dictionary’s first citation is 1612, from Edward Grimeston’s translation work, and the entry covers adverb, noun, and later adjective together. Merriam-Webster gives 1731 as the first known use of the noun. Other etymological notices put an adverbial legal use in the 1720s and the plea-as-noun around 1743. The spread is real, not a rounding error. Latin alibi is in English by the seventeenth century; the courtroom noun that speakers now take as basic is clearly in place in the eighteenth, when a defendant might still be said to prove himself alibi before the same idea hardened into a thing one has.
A second uncertainty is the route. Most English dictionaries simply mark the word as borrowed from Latin. Some etymologies suggest that the legal noun probably follows French. French had already made alibi a masculine noun with the criminal meaning by 1394, in a record where a man named Froissart answers a charge by setting out that on the day of the alleged act he was away concluding a property deal. The Académie française still dates the French noun to the fourteenth century. English legal Latin and French court language sat close together in the same centuries, so either a direct lift from Latin or a French-shaped legal sense is plausible. The spelling, in any case, is the Latin adverb unchanged.
Other, plus there
The Latin form is built from alius, other, and a locative ending -bi, the same ending seen in ibi, there, and ubi, where. American Heritage treats it as alius patterned on ibi. Merriam-Webster follows that locative -bi back to an Indo-European piece reconstructed as *-dhe plus a particle *-i, with relatives in Oscan puf and Umbrian pufe, Old Church Slavic kŭde, and Sanskrit kúha, all words for where.
Lewis and Short instead call alibi a contraction of aliubi, itself from alius plus ibi. That is not a rival etymology so much as a different way of cutting the same compound: other plus there. The Oxford Latin Dictionary’s analysis, alius with the -bi of ubi, sits with the first view. Nothing in the English word is a prefix in the modern sense. English took the adverb as a ready-made lump.
Alius belongs to the Indo-European other family that also gives English else, from Old English elles, and other, as well as Latin-derived alias, alien, and alter, and Greek allos. Sanskrit anya and Gothic aljis are further members. Those relatives share the idea of difference, not the idea of a defence. Only the locative adverb was specialised, in law, as a label for absence from a crime scene.
Narrowing, then widening
The legal sense is a tightening of elsewhere, not a metaphor. If a person was alibi, that person was not at the scene. The plea that one was alibi became, in English, an alibi one could prove or fail to prove. By the end of the eighteenth century the noun could mean the state of having been elsewhere, not only the spoken defence.
A later American widening drops the map. From the early twentieth century, and in one widely cited dating from 1912, alibi can mean a general excuse. Merriam-Webster adds the sense of a person or thing that supplies that cover. A verb, to alibi someone, is also mainly American; Merriam-Webster dates it to 1909, the Oxford English Dictionary to 1824. Those verbal dates diverge, and should be left as a disagreement rather than forced into one year.
Prescriptive comment on the excuse sense is really a defence of the locative. A story that does not put you in another place is, on the older terms, an excuse. Criminal procedure still treats a true alibi as a claim of absence, which is why notice rules and rebuttal witnesses attach to it in a way they do not attach to a vague justification.
French had extra senses earlier than English did. Fifteenth-century uses include ruse and diversion, and the old compound alibis forains for evasions. Those did not become the main English line. English kept the legal core and only later allowed the colloquial spread. As an international legal term the Latin form was copied widely: German Alibi, Dutch alibi, Italian alibi, Russian алиби. Spanish more often uses coartada, a reminder that European law did not have to keep the Latin adverb in order to name the same defence.
The locative is the point
What remains useful is the ending. Alibi is not a native English blend and not a cousin of alias that somehow acquired a by. It is a Latin locative adverb meaning in another place, taken into English as the name of a defence that stands or falls on location. First-attestation years still wobble between 1612 and the mid-eighteenth century, and French may or may not have taught English to treat the adverb as a noun. The morphology does not wobble: other, plus there.