(TWRP, CWM Recommended)
Always remember "Prevention is better than cure". If you are planning to flash a custom rom, First of all Backup your IMEI. Don't Trust that a custom ROM flash will not delete your IMEI number. because odds are it will. It's important to store your backup to external SD because some ROM flashing techniques will erase your internal SD. so the best way to keep your IMEI number is to take my advise and make a backup.
DISCLAIMER: Do not do try any of these methods unless your IMEI has been lost! Doing so may permanently corrupt your imei partition.
Temporary IMEI Restore (without Backup):
(These are Temporary Methods, so you need to do this every time you upgrade Firmware, install a new rom, or doing a factory reset.)
A . Chamelephon
1. Install Chamelephon.apk
2. Open App
3. Type both IMEI Numbers
4. Click "Apply new IMEIs"
B. MTK Droid Tools [PC, ADB Drivers Required]
1. Enable USB debugging
2. Open MTK Droid tools in PC
3. Allow USB debugging in phone if asked
4. Click ROOT button in MTK droid tools
5. Click Yes and Grant/Authorize root permission in phone
6. Click IMEI/NVRAM option in MTK droid tools
7. Type both IMEI numbers
8. Select "Replace IMEI"
9. Click OK
***********DOWNLOAD************MTK droid TOOl :- Click Here
Chamelephon.apk :- Click Here