Hikayat Muhammad Hanafiah was one of the Hikayats mentioned in the Malay annals read by the Malay warriors to raise their fighting spirit during the siege of Malacca by the Portuguese Empire in 1511.