The separation of leukocytes from whole blood is a prerequisite for many biological assays. Traditional methods require significant sample volumes and are often undesirable because they expose leukocytes to harsh physical or chemical treatment. Existing microfluidic approaches can work with smaller volumes, but lack selectivity. In particular, the selectivity of microfluidic systems based on microfiltration is limited by fouling due to clogging. Here, we developed a method to separate leukocytes from whole blood using the microfluidic ratchet mechanism, which filters the blood sample using a matrix of micrometer-scale tapered constrictions. Deforming single cells through such constrictions requires directionally asymmetrical forces, which enables oscillatory flow to create a ratcheting transport that depends on cell size and deformability. Simultaneously, oscillatory flow continuously agitates the cells to limit the contact time with the filter microstructure to prevent adsorption and clogging. We show this device is capable of isolating leukocytes from whole blood with 100% purity (i.e. no contaminant erythrocytes) and <2% leukocytes loss. We further demonstrate the potential to phenotypically sort leukocytes to enrich for granulocytes and lymphocytes subpopulations. Together, this process provides a sensitive method to isolate and sort leukocytes directly from whole blood based on their biophysical properties.