In recent years, the transformative evolution of cloud computing has reshaped organizational practices by enabling the outsourcing of web service applications. This shift has led to the emergence of the cloud environment, characterized by the involvement of Cloud Service Providers (CSPs) and intelligent applications. Cloud Service Composition (CSC) has become pivotal in this context, playing a crucial role in enhancing efficiency, Quality of Service (QoS), and customer satisfaction through the aggregation of diverse Cloud Services (CSs) to create composite services. However, the vast array of available CSs presents a challenge in efficiently addressing specified QoS requirements, turning CSC into a recognized NP-hard problem. Existing solutions, often involving third-party brokers, struggle with scalability in large-scale systems and overlook crucial security concerns. To address these limitations, we propose the Hierarchical Service Composition (HSC) approach, leveraging blockchain and federated learning to minimize computational complexity. The integration of Blockchain-enabled Federated Learning (BFL) facilitates machine learning model training with decentralized data, ensuring practicality and fairness. HSC comprises an initialization phase and two selection layers. The first selection layer enables each CSP to efficiently select services using a pre-trained model, while the second selection layer employs a blockchain-based QoS-aware mechanism for the final composition result, addressing privacy concerns. HSC introduces a novel framework, collaborative service selection methods, and a smart selection algorithm, demonstrating remarkable composition efficiency in extensive simulations compared to the baseline approach.