Firefly algorithm (FA) is a popular swarm intelligence optimization algorithm. Though FA was employed to solve various optimization problems, it still has some deficiencies, such as high complexity, slow convergence rate, and low precision of solutions. To tackle these issues, this paper proposes an efficient FA based on modified search strategy and neighborhood attraction (namely MSSNaFA). In MSSNaFA, there are four main modifications. First, a novel search strategy based on dimension differences is designed. The attractiveness in the original FA is related to the Euclidean distance, while our new method uses the differences of each dimension for two fireflies to compute the attractiveness. Then, a modified neighborhood attraction mechanism is utilized to reduce the computational complexity. When the current solution is selected, it will move to the global best solution based on the new movement strategy. Third, for each firefly, three neighborhood search operations are carried out based on a preset probability. Lastly, the step factor is adaptively adjusted in the search process. Performance validation between MSSNaFA and four other FA variants show the effectiveness of our approach.