We address two interrelated issues affecting the hinterland portion of the maritime container supply chain: reducing the movement of empty containers and reducing empty trips by trucks carrying these containers. In this paper, we show that empty container flow optimization can be implemented via a blockchain based on the proof‐of‐useful‐work concept where the proof of work requires the solution of an ‐hard optimization problem whose solution benefits the blockchain participants. Accordingly, we propose that anonymous miners compete to solve the container truck routing problem, which seeks to find the most efficient routes for trucks. We show that this problem is ‐hard. Miners must also solve the problem of optimally matching consignees and shippers, which will reduce transportation and storage costs for empty containers. In essence, the proposed framework turns blockchain into a massive optimization engine that directly benefits the hinterland container supply chain ecosystem.