Jahaz Mahal is located next to Hauz-i-Shamsi in Mehrauli, Delhi on its northeastern corner. It was so named, since its reflection  in the surrounding reservoir looked like a ship floating on a lake. It is inferred to have been built during the Lodi dynasty period (1452–1526) as a pleasure resort, Sarai or an inn.

One reason for building the Jahaz Mahal retreat was to provide transit accommodation as a Sarai or (inn) to the large number of pilgrims from Afghanistan, Arabia, Iran, Iraq, Morocco and Turkey who came to Delhi to visit the many Muslim shrines. Another version is that it was built as a retreat for the emperors, Akbar Shah II and Bahadur Shah II and their families, during the summer months, away from the heat and dust of Delhi.Its construction is dated between 1451 AD and 1526 AD, before Babar’s invasion and the beginning of Mughal rule in Delhi.

Source:wikipedia