ahmed95 wrote:using esp8266 module and arduino nano
That depends on what you expect it to do.
The OTA mechanism is only designed to update the firmware of the ESP8266, nothing else.
If you want to be able to update the Nano's firmware as well, you have to include some mechanism into the ESP's firmware and add hardware changes that makes it possible for the ESP to flash the Nano.
I'm not sure that would be a solid setup to begin with.
Just out of interest: why do you have an Arduino - ESP8266 design, what purpose does it have?
Nine times out of ten such a double MCU design is senseless and one could easily (and often easier) create a single MCU only solution.