We propose a realistic scheme to construct topological insulators with nonvanishing Chern numbers using spin-1/2 particles carrying out a discrete-time quantum walk in a two-dimensional lattice. By Floquet engineering the quantum-walk protocol, an Aharonov–Bohm geometric phase is imprinted onto closed-loop paths in the lattice, thus realizing an abelian gauge field—the analog of a magnetic flux threading a two-dimensional electron gas. We show that in the strong field regime, when the flux per plaquette is a sizable fraction of the flux quantum, *magnetic quantum walks* give rise to nearly flat energy bands featuring nonvanishing Chern numbers. We discuss an implementation of this scheme using neutral atoms in two-dimensional spin-dependent optical lattices, which enables the generation of arbitrary magnetic-field landscapes, including those with sharp boundaries. The robust atom transport, which is observed along boundaries separating regions of different field strength, reveals the topological character of the Chern bands. Magnetic quantum walks with nearly flat energy bands hold the promise to explore novel interaction-driven topological phases such as fractional Floquet Chern insulators.