I'm going to quote from a previous answer I gave on a similar question:
Hi there, You may be interested in a response that I gave to a similar question a few months ago: Why exactly do we call it the "Middle East"?
The only thing I might add to that comment is a source article I've since come across on JSTOR called Captain Mahan, General Gordon, and the Origins of the Term 'Middle East' from a 1976 issue of Middle Eastern Studies which basically just goes into greater depth than I did, that Mahan didn't coin the term but for various reasons his article popularised it and has been attributed to him since.
The TL;DR is that while we have examples of the phrase being used in the 19th century it was popularized by Alfred Thayer Mahan (of The Influence of Sea Power Upon History fame) in an article he wrote in 1902, which then got picked up by that generation of Middle East experts or "experts" like Mark Sykes such that it was arguably the preferred technical term by the time of WWI and had been adopted universally by WWII in the form of "Middle East Command."