Publisher Hachette and online US retailing giant Amazon said Thursday they had reached a deal to end their acrimonious feud over online book sales.