Theory of complex variables is a very powerful mathematical technique for solving two-dimensional problems satisfying the Laplace equation. On the basis of the conventional Cauchy integral formula, the conventional complex variable boundary integral equation (CVBIE) can be constructed. The limitation is that the conventional CVBIE is only suitable for holomorphic (analytic) functions, however. To solve for a complex-valued harmonic-function pair without satisfying the Cauchy–Riemann equations, we propose a new boundary element method (BEM) based on the general Cauchy integral formula. The general Cauchy integral formula is derived by using the Borel–Pompeiu formula. The difference between the present CVBIE and the conventional CVBIE is that the former one has two boundary integrals instead of only one boundary integral in the latter one. When the unknown field is a holomorphic function, the present CVBIE can be reduced to the conventional CVBIE. Therefore, the conventional Cauchy integral formula can be viewed as a special case applicable to a holomorphic function. To examine the present CVBIE, we consider several torsion problems in this paper since the two shear stress fields satisfy the Laplace equation but do not satisfy the Cauchy–Riemann equations. Using the present CVBIE, we can directly solve the stress fields and the torsional rigidity simultaneously. Finally, several examples, including a circular bar containing an eccentric inclusion (with dissimilar materials) or hole, a circular bar, elliptical bar, equilateral triangular bar, rectangular bar, asteroid bar and circular bar with keyway, were demonstrated to check the validity of the present method.