Particle Swarm Optimization (PSO) is arguably one of the most popular nature-inspired algorithms for real parameter optimization at present. In this article, we introduce a new variant of PSO referred to as Hierarchical D-LPSO (Dynamic Local Neighborhood based Particle Swarm Optimization). In this new variant of PSO the particles are arranged following a dynamic hierarchy. Within each hierarchy the particles search for better solution using dynamically varying sub-swarms i.e. these sub-swarms are regrouped frequently and information is exchanged among them. Whether a particle will move up or down the hierarchy depends on the quality of its so-far best found result. The swarm is largely influenced by the good particles that move up in the hierarchy. The performance of Hierarchical D-LPSO is tested on the set of 25 numerical benchmark functions taken from the competition and special session on real parameter optimization held under IEEE Congress on Evolutionary Computation (CEC) 2005. The results have been compared to those obtained with a few best-known variants of PSO as well as a few significant existing evolutionary algorithms.