A method and device for preparing a karst cave based on three-dimensional (3D) printing technology. The preparation method comprises the following steps: (1) determining the size of a sample according to test requirements, constructing a 3D karst cave (5) digital model based on a 3D karst cave (5) scanning result, and performing 3D printing using an alloy, so as to form a primary karst cave (5) sample; (2) obtaining a rock similar material mixture according to a proportioning scheme; (3) pouring the mixture into a sample mold while pre-burying the karst cave (5) model into the mixed material according to the position of the karst cave (5); (4) maintaining the sample together with a forming mold at room temperature until the rock similar material is hardened, removing the forming mold, and maintaining at constant temperature and humidity and then baking a prepared rock sample (2) containing the karst cave (5) or electrifying and heating same by means of an electric heating wire provided in the alloy, so as to