Its name once belonged to a single building, a merchants' inn raised by Jaharkas al-Khalili, master of the stables to Sultan Barquq, during that sultan's first reign (1382–1389); over the centuries it spread to the whole quarter. The market draws both foreign visitors and Egyptians, and its edges blur into the busy shopping streets around it.

The ground has a royal past. In Fatimid times this was the southern end of the great eastern palace of the caliphs, and al-Khalili built his inn on the site of their burial place, the Saffron Tomb, which he pulled down. Once Saladin opened the old palace city to ordinary people after 1171, the main street, the Qasaba, filled with markets, mosques and royal tombs, and when it ran out of room, traders moved east towards al-Azhar Mosque. There the Mamluks built khans and wikalas: tall caravanserais around a courtyard, with storerooms for merchants' goods, lodgings upstairs and shops facing the street. By the late 15th century the district was the centre of Cairo's foreign trade.

The oldest monuments still standing date from Sultan al-Ghuri, who rebuilt the quarter in 1511. Along the street called Sikkat al-Badistan, the two carved stone gates of his covered market survive: Bab al-Badistan on the west and Bab al-Ghuri, with its vaulted ceiling, on the east. Opposite Bab al-Ghuri stands what is left of the Wikala al-Qutn, its front and doorway, the inn that replaced al-Khalili's original khan, and the partly preserved Wikala of Sulayman Agha al-Silahdar, built in 1837.

Today the shops sell mostly souvenirs, antiques and jewellery, while the goldsmiths' market next door still serves local buyers. Many craft workshops carry on in courtyards and upper floors, making some of the goods sold below. Small, traditional coffeehouses serve Arabic coffee and shisha among the stalls and street food sellers; the best known is El-Fishawy Café, founded in 1773. The eastern part, built up in the late 1930s with blocks of shops and flats, is where most tourists spend their time.

Khan el-Khalili is easy to combine with other sights of Islamic Cairo. The shrine and mosque of al-Hussein border it, Al-Azhar Mosque and its university are close by, and the monumental street of Bayn al-Qasrayn lies just to the northwest. The bazaar is also the setting of Naguib Mahfouz's novel Midaq Alley.