Premerger localization of binary neutron stars (BNSs) is one of the most important scientific goals for the third-generation (3G) gravitational-wave detectors. It will enable the electromagnetic observation of the whole process of BNS coalescence, especially for the premerger and merger phases, which have not been observed yet, opening a window for deeper understandings of compact objects. To reach this goal, we describe a novel combination of multiband matched filtering and semianalytical localization algorithms to achieve early-warning localization of long BNS signals in 3G detectors. Using our method we are able to efficiently simulate one month of observations with a three-detector 3G network, and show that it is possible to provide accurate sky localizations more than 30 minutes before the merger. Our simulation shows that there could be ∼10 (∼100) BNS events localized within 100 deg2, 20 (6) minutes before merger, per month of observation.