A simulation for calculating fast-electron bremsstrahlung in the HL-3 tokamak based on the Monte Carlo simulation code Geant4 is developed, in which the plasma geometry and forward scattering of fast-electron bremsstrahlung are considered. The preliminary calculation results indicate that the HXR energy deposition on the detector is symmetrically distributed, even though the plasma distribution is asymmetric owing to the toroidal effect. These simulation results are helpful in constructing the relationship between the energy deposition on the detector and parameter distribution on the plasma cross section during HL-3 experiments. This is beneficial for the reconstruction of the fast-electron distribution function and for optimizing the design of the HXR-imaging system.