Boundary-layer receptivity is the initial stage of the laminar-turbulent transition process, which plays a key role in the transition, especially for the case of three-dimensional boundary-layer flow. The research of the three-dimensional boundary-layer receptivity is theoretically significant for further understanding of the mechanisms of laminar-turbulent transition and turbulence formation. A numerical method is used to study the three-dimensional boundary-layer receptivity under the interaction of the free-stream turbulence and the three-dimensional localized wall roughness. Then whether a new cross-flow instability mode can be found in the three-dimensional boundary layer is studied. Subsequently, investigated are the conditions under which the steady or unsteady cross-flow instability mode can be induced in the three-dimensional boundary layer, the influences of the intensity, spanwise wave number and normal wave number of the free-stream turbulence, and the size and structure of the three-dimensional roughness on the three-dimensional boundary-layer receptivity under the free-stream turbulence interacting with the three-dimensional localized wall roughness, and the instability mode that can be induced and its role in the three-dimensional boundary-layer receptivity. The numerical results show that when the turbulence intensity is low, the steady cross-flow vortex excited by the three-dimensional localized wall roughness dominates the three-dimensional boundary-layer receptivity; on the contrary, when the turbulence intensity is high, the unsteady cross-flow vortex excited by the free-stream turbulence dominates the receptivity; additionally, when the interaction between the three-dimensional localized wall roughness and the free-stream turbulence is existent, three kinds of instability modes are all produced at the same time, namely, the steady cross-flow vortex, the unsteady cross-flow vortex and the new unsteady cross-flow vortex whose dispersion relation is equal to the linear combination of the positive and negative spanwise wave numbers of the first steady cross-flow vortex and the second unsteady cross-flow vortex. The in-depth research on the three-dimensional boundary-layer receptivity under the interaction of the free-stream turbulence and the three-dimensional localized wall roughness is of benefit to accomplishing the hydrodynamic instability theory and the turbulence theory, and providing the theoretical foundation for the prediction and control of the laminar-turbulent transition.