Nowadays, Vehicular ad hoc networks (VANETs) has received interest in the research because it is used to provide the information for drivers and passengers. In the urban VANET, security and safety is a main issue in recent days because of different kinds of attacks. From the attacks, Sybil attack can be considered as a very difficult for urban VANET networks. Hence, in this paper Emperor Penguin Optimization based Routing protocol (EPORP) is developed for detecting the Sybil attack as well as increasing the system performance. The main objective of the research is detecting the Sybil attack as well as improve the security in VANETS. The initial objective is achieved with the help of Rumour riding technique which detect the Sybil attack in the urban VANET.Similarly, the security of the system is achieved with the help of Split XOR (SXOR) operation. In the SXOR operation, the optimal key is generated with the assistance of Emperor Penguin Optimization (EPO). The proposed method is implemented in NS2 platform and performances are evaluated by metrics such as delay, throughput, delay, encryption time and decryption time. The proposed method is compared with existing methods such as Whale Optimization Algorithm (WOA), Particle Swarm Optimization (PSO) and Firefly Algorithm (FA) respectively. While analyzing the delivery ratio, the proposed method has 0.96sec and the WOA, PSO and FA is 0.94, 0.92 and 0.90 respectively. From the analysis, the proposed method has the high delivery ratio value compared with the WOA, PSO and FA methods. Similarly, the other parameters are analyzed and compared with the existing methods.