Astrometric detection and mass determination of Earth-mass exoplanets requires sub-microarcsec accuracy, which is theoretically possible with an imaging space telescope using field stars as an astrometric reference. The measurement must however overcome astrometric distortions which are much larger than the photon noise limit. To address this issue, we propose to generate faint stellar diffraction spikes using a two-dimensional grid of regularly spaced small dark spots added to the surface of the primary mirror (PM). Accurate astrometric motion of the host star is obtained by comparing the position of the spikes to the background field stars. The spikes do not contribute to scattered light in the central part of the field and therefore allow unperturbed coronagraphic observation of the stars immediate surrounding. Because the diffraction spikes are created on the PM and imaged on the same focal plane detector as the background stars, astrometric distortions affect equally the diffraction spikes and the background stars, and are therefore calibrated. We describe the technique, detail how the data collected by the wide-field camera are used to derive astrometric motion, and identify the main sources of astrometric error using numerical simulations and analytical derivations. We find that the 1.4 m diameter telescope, 0.3 sq.deg field we adopt as a baseline design achieves 0.2 microarcsec single measurement astrometric accuracy. The diffractive pupil concept thus enables sub-microarcsec astrometry without relying on the accurate pointing, external metrology or high stability hardware required with previously proposed high precision astrometry concepts.