We examine a heterogeneous alternating-direction method for the approximate solution of the FENE Fokker–Planck equation from polymer fluid dynamics and we use this method to solve a coupled (macro-micro) Navier–Stokes–Fokker–Planck system for dilute polymeric fluids. In this context the Fokker–Planck equation is posed on a high-dimensional domain and is therefore challenging from a computational point of view. The heterogeneous alternating-direction scheme combines a spectral Galerkin method for the Fokker–Planck equation in configuration space with a finite element method in physical space to obtain a scheme for the high-dimensional Fokker–Planck equation. Alternating-direction methods have been considered previously in the literature for this problem (e.g. in the work of Lozinski, Chauvière and collaborators [J. Non-Newtonian Fluid Mech.122 (2004) 201–214; Comput. Fluids33 (2004) 687–696; CRM Proc. Lect. Notes41 (2007) 73–89; Ph.D. Thesis (2003); J. Computat. Phys.189 (2003) 607–625]), but this approach has not previously been subject to rigorous numerical analysis. The numerical methods we develop are fully-practical, and we present a range of numerical results demonstrating their accuracy and efficiency. We also examine an advantageous superconvergence property related to the polymeric extra-stress tensor. The heterogeneous alternating-direction method is well suited to implementation on a parallel computer, and we exploit this fact to make large-scale computations feasible.