In situ nanolithography is realized based on warm spin-casting of block copolymer solutions. This advancement is based on Si-containing block copolymers with an appropriate thermodynamic driving force for spontaneous phase-separation combined with the thermal assistance provided by slight temperature elevations during the spin-casting. Sub-10 nm half-pitch nanoscale patterns are produced within 30 s without a separate annealing process.