K ellie's Castle (sometimes also called Kellie's Folly ) is a castle located in Batu Gajah , Kinta District , Perak , Malaysia . The unfinished, ruined mansion, was built by a Scottish planter named William Kellie-Smith . According to differing accounts, it was either a gift for his wife or a home for his son. [ citation needed ] Kellie's Castle is situated beside the Raya River (Sungai Raya), which is a small creek to the Kinta River .