"Port" tab grayed out under tools after using ESP8266.

When I use my Arduino Nano without ESP8266, the IDE automatically selects the suitable port, and the program uploads smoothly without any errors. Now problem arises when i use ESP8266. When I power the nano board with the USB cable, red and blue lights of the ESP8266 flash for a second and they go off. None of the lights glow. And the port tab in the tools menu gray out. Also, in the device manager of windows, nothing shows up as "unknown devices" or "ports".
CH_PD 3.3V
Vcc 3.3V

It's well known that connecting an ESP8266 to the RX and TX pins of an Arduino board like the Nano will interfere with the ability to upload to the Nano, since those pins are also used to communicate with the computer. However, it's not normal for that to cause the port to disappear. It's also well known that the 3.3V pin of the Nano can't provide sufficient current for reliable operation of the ESP8266. Since the 3.3 V power comes from the USB chip on the Nano that creates the port on your computer, it is possible that the high current draw of the ESP8266 is shutting down that chip.

Try removing the connection between the ESP8266 and the Nano's 3.3V pin and then connect a separate power source to the ESP8266, which is capable of providing enough current.