The standard Mie theory for the extinction of electromagnetic radiation by a metal cylinder that is irradiated by a normally incident plane wave is extended to the case of a metallic nanowire, where two quantum longitudinal waves are excited. The modification of the Mie theory due to quantum diffraction effects is included by employing the quantum hydrodynamic approximation and applying the appropriate quantum additional boundary conditions. The extinction properties of the system and their differences with previous treatments based on the standard local and nonlocal models are shown. Also, as an example the validity of the nonretarded approximation in the quantum nonlocal optical response of a sodium nanowire is discussed.