The classical Bretherton problem describes the propagation of gas fingers through liquid media in a narrow channel with thin liquid films between bubbles and channel walls. The bubble shape and flow patterns are complicated functions of the capillary number Ca and Reynolds number Re. Recently, we investigated the applicability and parameter selection for the two-dimensional Bretherton problem (flow between parallel plates) using the free-energy binary liquid lattice Boltzmann method (LBM) . This paper is the continuation of our previous work with simulations of three-dimensional channels with rectangular (mostly square) cross sections in the range of the capillary number 0.05 ≤ Ca ≤ 6.0. The flow is driven by a body force, and periodic boundary conditions are applied in the streamwise direction. The results show that the binary liquid model is able to correctly capture a number of phenomena occurring in three-dimensional capillaries, such as the existence of a vortex in front of the bubble and the way bubble radii depend on the capillary number. We conclude that lattice Boltzmann free energy binary liquid model can be used to simulate the Bretherton problem with good accuracy.