An immersed boundary fast integration methodology featured by a consistent weight learning is proposed to accelerate Galerkin meshfree computation. In the proposed approach, the problem domain is embedded in a rectangular spatial domain discretized by regular distributions of meshfree nodes and integration sampling points with virtual integration cells. A trimming operation of the rectangular spatial domain by the physical problem boundary with nodal discretization yields the discrete model for meshfree computation, where the integration sampling points are grouped into the interior sampling points and the near boundary sampling points which form a training set. For the interior sampling points, a natural alignment between the influence domains of meshfree shape functions and virtual integration cells can be easily realized through employing integer support sizes, which ensures a satisfactory accuracy for the basis degree correspondent normal order Gauss integration. The background cells for the domain integration are completely avoided, which greatly simplifies the preprocessing for numerical integration. Meanwhile, a machine learning module is devised to optimize the weights of near boundary integration sampling points. The key step to construct this machine learning module for weight optimization is the selection of the variational integration consistency condition as the loss function, which guarantees the convergence of Galerkin meshfree formulation. The accuracy and efficiency of the proposed weight learning immersed boundary fast integration methodology is thoroughly validated through numerical results.