With the proliferation of electric vehicles (EVs), private charging pile (PCP) sharing networks are likely to be an integral part of future smart cities, especially in places with limited public charging infrastructure. However, there are a number of operational challenges associated with the deployment of PCPs in such a shared and untrusted environment. For example, how do we formulate efficient PCP sharing strategies in PCP sharing networks, while also taking into consideration the dynamic charging behaviors of EVs? Therefore, in this paper, we propose an energy <underline xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">b</u> lockchain- <underline xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">b</u> ased secure P <underline xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">C</u> P sharing scheme (BBC) for PCP sharing networks. First, an energy blockchain-based framework is designed for PCP sharing networks to facilitate energy sharing services for EVs and PCPs, using both distributed ledgers and cryptocurrency. Then, we devise a reputation-based secure PCP sharing algorithm to improve consensus efficiency with smaller signature sizes. In addition, a distributed reputation mechanism is constructed to assess the trustworthiness of consensus nodes in blockchain, based on ratings, behaviors, and fading. We also model the interactions among EVs and cooperative PCPs as a joint coalition-matching game, and obtain the optimal strategies of PCPs and EVs by analyzing the Nash-stable coalitional structure and stable many-to-one matching pairs. Extensive simulations and the real-world implementation demonstrate that the proposed approach improves the utility of EV users and renewable energy efficiency in PCP sharing networks.