Applying the discrete element method (DEM) in soil mechanics can provide abundant information at the particle-scale and facilitates illustration of the macro-mechanical behaviour of soils based on the inter-particle mechanisms. The triaxial test is one of the most common laboratory methods to study the macro-mechanical behaviour of particulate materials such as soil. However, many problems in geotechnical design can be assumed and simplified as a plane strain phenomenon. Therefore a biaxial test can be conducted to reproduce the macro-mechanical behaviour of soil, where the sample is enclosed by two horizontal rigid platens and a vertical latex membrane, which is a deformable continuous element and allows the enclosed specimen to deform freely while maintaining confining stress during loading. This paper presents an algorithm to represent physical and mechanical characteristics of latex membrane in the 2D DEM simulation of biaxial test using the PFC2D code. To investigate the impact of the lateral boundary conditions on the micro-macro mechanical behaviours of soil samples, two sets of DEM biaxial tests are conducted, i.e. with rigid and deformable lateral boundary conditions. The DEM modeling results indicate that the lateral boundary conditions have a significant effect on the micro-scale fabric properties, thickness and inclination of the shear band. The comparison between these two simulations also demonstrates that the lateral boundary conditions play a major role in the peak and post-peak stress-strain behaviours as well as the dilation and critical state behaviours of granular soils.