In recent years, the penetration of distributed energy resources has been increased dramatically in the power system, however, according to their small capacity, we need to aggregate these resources in an incorporated unit and examine their participation in the energy and ancillary services market. This goal can be achieved using virtual power plants (VPPs) concept. This paper describes the optimal bidding strategy of a VPP in the energy and spinning reserve markets. In order to improve the performance of the VPP, dispatchable distributed generation (DGs) sources, wind turbines (WTs), thermal and electrical energy storages, combined heat and power (CHP) unit and electric vehicles (EVs) have been considered in the VPP structure. The optimization task has also been addressed in the form of a MILP problem with considering the network and unit constraints and smart EVs’ charging. Finally, to evaluate the effectiveness of the proposed method, simulations are performed on a 21-bus VPP. The simulation results show that the VPP profit will increase by 23% by participating in the spinning reserve market.