This paper presents an analytical method based on the shear flow distribution law to study the shear lag effect of thin-walled single- and double-cell box girders. The first step in this method is to determine the box girder’s shear flow distribution. Subsequently, a series of novel improved longitudinal displacement functions mathematically expressed as cubic parabolas are established. The parabolic origin of these functions is located at the zero point of the shear flow corresponding to each plate; the unknown parameters used to describe the function form can be determined according to the shear flow distribution, the continuity conditions, and the axial force balance condition. Then, the variational energy method is adopted to derive the governing differential equations. The shear lag effect in thin-walled single- and double-cell box girders under several boundary conditions and load cases is studied and analytical expressions for the shear lag coefficient are derived. Finally, results obtained using the proposed method are validated via comparison with numerical results. The results show that the proposed method can provide reasonable predictions for the shear lag effect of single- and double-cell box girders, and that this method is more straightforward and practical. In addition, the shear lag coefficients at different webs are not entirely equal, which is related to the distance from the web to the zero point of the shear flow.