The development of a miniature triaxial apparatus is presented. In conjunction with an X-ray micro-tomography (termed as X-ray μCT hereafter) facility and advanced image processing techniques, this apparatus can be used for investigation of the micro-scale mechanical behavior of granular soils under shear. The apparatus allows for triaxial testing of a miniature dry sample with a size of (diameter height). triaxial testing of a 0.4–0.8 mm Leighton Buzzard sand (LBS) under a constant confining pressure of 500 kPa is presented. The evolutions of local porosities (i.e., the porosities of regions associated with individual particles), particle kinematics (i.e., particle translation and particle rotation) of the sample during the shear are quantitatively studied using image processing and analysis techniques. Meanwhile, a novel method is presented to quantify the volumetric strain distribution of the sample based on the results of local porosities and particle tracking. It is found that the sample, with nearly homogenous initial local porosities, starts to exhibit obvious inhomogeneity of local porosities and localization of particle kinematics and volumetric strain around the peak of deviatoric stress. In the post-peak shear stage, large local porosities and volumetric dilation mainly occur in a localized band. The developed triaxial apparatus, in its combined use of X-ray μCT imaging techniques, is a powerful tool to investigate the micro-scale mechanical behavior of granular soils.