Out-of-plane (OOP) failure of unreinforced masonry (URM) walls in two-way bending was widely observed after natural hazards such as earthquakes. Of various crucial factors influencing the force capacity of URM walls in OOP two-way bending (force capacity being defined as the wall peak force in terms of pressure), the pre-compression and aspect ratio (defined as the wall height to length with the height kept constant) have not been sufficiently studied. To better understand their influence, an extensive numerical study was conducted by employing a detailed 3D brick-to-brick modelling method. First, a set of monotonic quasi-static tests on full-scale walls was taken as references for calibration and validation. The numerical results matched well with the experimental results in terms of initial stiffness, force capacity and crack pattern. Afterwards, the validated model was adopted to carry out a parametric study. Results show that the force capacity of the URM walls in OOP two-way bending is exponentially related to the aspect ratio and linearly related to the pre-compression. Besides, the influence of the pre-compression and aspect ratio on the force capacity can be interdependent. Additionally, when the pre-compression is relatively low, a wall does not crack in a localized manner into several rigid plane plates at the force capacity. Instead, the deformed shape of the wall approximates a curved surface, indicating distributed rather than localized cracking at force capacity. Furthermore, the force capacity is much higher than the residual force when the rigid-plates crack pattern is formed in the post-peak stage. The parametric study also shows that torsional failure of bed joints is the predominant failure mechanism for URM walls in OOP two-way bending, and its contribution to the force capacity generally increases as the pre-compression or aspect ratio increases. Finally, the numerical results were compared with the predictions by three major analytical formulations, namely Eurocode 6, Australian Standard for Masonry Structures (AS 3700) and Willis et al. (2006). As a result, the relations between the force capacity and the aspect ratio or pre-compression derived from the numerical models could not be accurately predicted by the analytical formulations. Based on previous results, recommendations on improving the analytical formulations were proposed.