We studied the non-linear mechanical response and failure mechanism of columnar jointed basalts (CJBs) with transverse joints by modeling meso-mechanics, statistical damage theory and continuum mechanics. The anisotropy and shape effect of CJBs with transverse joints were captured under different lateral pressures. The digital images were transformed into heterogeneous element meshes, and the gradual fracturing process and various failure modes of CJBs were reproduced. The compressive strength (CS) and equivalent deformation modulus (EDM) of CJBs parallel and perpendicular to the column axis were studied. The results show that the U-shaped CS curve of CJB appears as the column dip angle increases, and the CS is obviously improved as the lateral pressure increases when the column dip angle is 0°–90°. When the shape of CJB changes from 6 m × 3 m, 3 m × 3 m to 1.5 m × 3 m, the CS continues to increase. Meanwhile, the transverse joints are proven to be critical for determining the mechanical properties of CJBs at the certain dip angles of columns. However, the high lateral pressure can reduce the CS difference between the CJBs with and without the transverse joints. Besides, as the elastic modulus of joints rises, the CS will grow up, and the EDM will increase first and then almost remain at the same level. The coefficient of rock residual strength has a great influence on the CS at the certain dip angles of columns. Additionally, the model boundary significantly affects the anisotropy and shape effect of mechanical properties of CJBs under compression. These conclusions will improve our knowledge of the failure mechanisms and failure patterns of CJBs containing transverse joints.