Want to setup Mpu9250 and Esp 8266 01 together using an Arduino Mega

Why the Mega for one I2C device.

An ESP8266 is more powerful and has more memory on it's own.

Get one with USB chip, like the WeMos D1 mini, or NodeMCU etc., and you can program directly via the USB connector.
Leo..