Crowdsourced last-mile delivery leverages workers willing to complete delivery tasks posted by requesters for incentives through dedicated platforms. While this is effective and affordable, crowdsourced delivery faces significant challenges, including the workforce’s uncertain availability and capability to deliver packages safely, inadequate package monitoring, and a lack of trust among the participants. These issues have become increasingly pronounced due to the rapid growth of e-commerce, where last-mile delivery constitutes a substantial portion of overall delivery costs and delays. Existing centralized works attempt to tackle the uncertainty of workforce availability and capability by analyzing worker behavior or predicting the fulfillment success in the allocation mechanism. On the other hand, decentralized solutions introduce blockchain-based platforms for transparent and secure interaction and transaction recording to tackle the challenge of lack of trust. These existing approaches, however, overlook a critical aspect of crowdsourced delivery, where successful task completion relies not only on worker commitment but also on delivered package status. In response, this work proposes a comprehensive framework leveraging machine learning, blockchain, and digital twins for package safe and transparent delivery. The proposed approach utilizes machine learning models to predict the delivery success of packages off-chain secured using IPFS and smart contracts events. Subsequently, a task allocation mechanism hosted on a blockchain integrates the projected delivery success with the Quality of Service (QoS) metric to assign tasks to workers with an increased likelihood of successful completion. Package digital twins are designed and employed to monitor packages in real-time, providing transparent feedback on package status and delivery. The trained models demonstrate an average accuracy of 96% and an F1-score of 94%. Evaluation with real-world data revealed substantial enhancements: task success rates improved by 48%, quality of service by 41%, worker reputation by 26%, and package delivery quality by 16%.