The load capacity and lubrication performance of the slewing bearing are fairly sensitive to edge effects at both ends of the main thrust rollers. Therefore, quantitative investigations of the edge effect at both ends of slewing bearing is practically important. In this study, an elastic fluid lubrication model of the slewing bearing that considered the external load and internal structural parameters is established. A modification function of rollers is included in a finite long-line contact elastic fluid lubrication model to perform the dynamic analysis. The simulated oil film’s thickness and pressure distributions are compared under different working conditions. And the edge effect is eliminated by modifying the rollers’ construction. The results indicate that under the large eccentric load, the speed of the slewing bearing must be decreased to ensure elastic fluid lubrication performance. A genetic algorithm that used to discover the optimal modification length shows the best busbar of the main thrust roller is 12 μm, which could decrease the vibration amplitude of the unmodified roller by 8.13%. This result gives a significant way for slewing bearing’s structural design.