The invention discloses an X-ray detector based on a perovskite material and a preparation method of the X-ray detector. The method comprises the steps: 1, weighing AI and BI3 raw materials accordingto a molar ratio of 3: 2, and dissolving the AI and BI3 raw materials in an organic solvent to obtain a mixed precursor solution, wherein AI is CsI, CH3NH3I or RbI, and BI3 is BiI3 or SbI3; 2, sealingthe mixed precursor solution, heating the solution to 60-100 DEG C and maintaining the temperature for 2-48 hours to achieve full dissolution equilibrium, and then, taking supernate to obtain a completely saturated solution of the precursor; 3, placing the completely saturated solution of the precursor at an environment temperature lower than the heating termination temperature in the step 2, then, gradually carrying out heating at a speed of less than 5 DEG C / day until crystallization, and stopping heating until the temperature is continuously increased by at most 10 DEG C to obtain an A3B2I9 perovskite single crystal; 4, taking out the single crystal and carrying out drying; and 5, evaporating an interdigital metal electrode on the surface of the single crystal.