The promotion of electric vehicles (EVs) is an important measure for dealing with climate change and reducing carbon emissions, which are widely agreed goals worldwide. Being an important operating mode for electric vehicle charging stations in the future, the integrated photovoltaic and energy storage charging station (PES-CS) is receiving a fair amount of attention and discussion. However, how to optimally configure photovoltaic and energy storage capacity to achieve the best economy is essential and a huge challenge to overcome. In this paper, based on the historical data-driven search algorithm, the photovoltaic and energy storage capacity allocation method for PES-CS is proposed, which determines the capacity ratio of photovoltaic and energy storage by analyzing the actual operation data, which is performed while considering the target of maximizing economic benefits. In order to achieve the proposed capacity allocation, the method is as follows: First, the economic benefit model of the charging stations is established, taking the net present value and investment payback period as evaluation indicators; then, by analyzing the operation data of the existing charging station with the target of maximizing economic benefits, the initial configuration capacity is obtained; finally, the capacity configuration is verified through a comprehensive case analysis for the actual operation data. The results show that the capacity configuration obtained through the data analysis features an optimized economic efficiency and photovoltaic utilization. The proposed method can provide a theoretical and practical basis for newly planned or improved large-scale charging stations.