In a letter to companies bidding for contracts to supply ID cards, Grayling said: "It is our intention to cancel the ID card project immediately on our being elected to government. I think it is important that companies bear this in mind before committing to any long-term contracts."
Last month the then home secretary Jacqui Smith announced that high street retailers including the Post Office were in discussion with the Identity and Passport Service about offering a fingerprint and photography service to customers applying for cards.
Post Office managing director Alan Cook said at the time that the nationwide network was "ideally placed to play a key role in the rollout of the National Identity Service".
ID cards are being trialled in Manchester from this autumn.