Abstract Using a global 3D, fully self-consistent, multifluid hydrodynamic model, we simulate the escaping upper atmosphere of the warm Neptune GJ 436b, driven by the stellar X-ray and ultraviolet (XUV) radiation impact and gravitational forces and interacting with the stellar wind. Under the typical parameters of XUV flux and stellar wind plasma expected for GJ 436, we calculate in-transit absorption in Lyα and find that it is produced mostly by energetic neutral atoms outside of the planetary Roche lobe, due to the resonant thermal line broadening. At the same time, the influence of radiation pressure has been shown to be insignificant. The modeled absorption is in good agreement with the observations and reveals such features as strong asymmetry between blue and red wings of the absorbed Lyα line profile, deep transit depth in the high-velocity blue part of the line reaching more than 70%, and the timing of early ingress. On the other hand, the model produces significantly deeper and longer egress than in observations, indicating that there might be other processes and factors, still not accounted for, that affect the interaction between the planetary escaping material and the stellar wind. At the same time, it is possible that the observational data, collected in different measurement campaigns, are affected by strong variations of the stellar wind parameters between the visits, and therefore they cannot be reproduced altogether with the single set of model parameters.