There is a need to develop inexpensive, portable and easy-to-use devices for viral sample processing for resource-limited settings. Here we offer a solution to efficient virus capture by incorporating macroporous materials with regular structures into microfluidic devices for affinity chromatography. Two-dimensional simulations were first conducted to investigate the effects of two structures, a nanopost array and a spherical pore network, on nanoparticle capture. Then, the two structures were created in polymers by templating anodic aluminum oxide films and 3D close-packed silica particles, respectively. When the microdevices containing functionalized porous materials were tested for human immunodeficiency virus (HIV) isolation, capture efficiencies of 80–99% were achieved under a continuous flow. Comparatively, functionalized flatbed microchannels captured around 10% of HIV particles. As the characteristic dimensions of the nanostructures are tunable, such devices can be adapted for the capture of different submicron bioparticles. The high capture efficiency and easy-to-operate nature suit the need of resource-limited settings and may find applications for point-of-care diagnostics.