The slowing-down process of Ti atoms in crystalline Ti and Si atoms in crystalline Si is studied using the molecular-dynamics method. Based on an experimental technique available for studies of the slowing-down process of atoms at ultralow velocities in bulk matter, the initial recoil energy was 261 eV for Ti and 677 eV for Si atoms. The values correspond to the energies imparted after the thermal neutron capture by primary γ rays. The effect of the crystalline structure on the slowing-down process is studied by calculating the energy distribution of the Doppler-shifted secondary γ rays emitted by the recoiling nuclei. The dependence of the distribution on the interatomic potential used in the simulations is also investigated.