A former alcoholic and jailbird has written a crime thriller set in MK after inspiration struck in his prison cell.