Great question, and by no means a simple one. While there are etymological examples of "Middle East" that are earlier, the basic answer as far as I'm aware for when this became widespread was in World War I.
Its use grew out of the need for an alternative to two older terms. The "Near East" had been understood to include the Balkans, but that wasn't really applicable for fighting that was taking place with an Egyptian Expeditionary Force heading into Palestine on the one hand and for a separate expeditionary army heading into Mesopotamia on the other, and so the "Middle East" came to be the preferred term of men like Mark Sykes (of Sykes-Picot fame). The OED cites examples of its use to the mid 19th century, but Alfred Thayer Mahan's use of the term at the turn of the 20th century, as I understand it, was the germ of its wider use.
While "the Orient" also had wide usage among European scholars of the region (i.e. Orientalists) that term is both vague (and to American ears might refer to the Far East as well) and has since at least the publication of Edward Said's Orientalism in 1978, taken on some rather nefarious overtones. Nonetheless, academic area studies of this region are still quite often put under "Oriental Studies" rather than "Middle East Studies".
By World War II this had been formalized by the British into a "Middle East Command". It was also mooted during that war, given a rather confusing command structure and also the need to move around some generals in such a way as to "promote them out of the way", that perhaps there should be a "Near East" command for the North Africa campaign and a "Middle East Command" which would have control of everything between Iraq and India. That certainly seems sensible enough given that, at present, "Near East" is practically synonymous with "Middle East", but the proposal was rejected.
The term continues to give people trouble. The Bush Administration put forward the term "Greater Middle East" to ensure that the "Middle East" included not only the core Middle East but also North Africa, parts of the Sahel, parts of the Horn of the Africa, and Af-Pak. That hasn't really caught on, but I still regularly encounter people who want to put, say, Afghanistan in "the Middle East". I'm personally more comfortable regarding it as part of "South Asia".
MENA (Middle East and North Africa) is also quite common. I'm basically happy with that term. The absurd corporate "EEMEA", much less so.
For simplicity's sake on this sub my flair refers to "Middle East" and I often discuss it as such, but properly speaking I'm an Arabist. For that reason you'll often hear of an "Arab Middle East" to refer specifically to those areas where the people and language are predominantly Arab.