Finding the locations of departments or machines in a workspace is classified as a Facility Layout Problem. Good placement of departments has a relevant influence on manufacturing costs, work in process, lead times and production efficiency. This paper analyses the problem of allocating departments with restrictions in terms of unequal area and rectangular shape within a facility, in order to minimize the sum of material handling costs taking into account the satisfaction of the aspect ratio requested. In particular, we propose for the first time a Firefly Algorithm based on the slicing structure encoding. The proposed method was tested comparing the results obtained from other authors on the same literature instance. The results confirm the effectiveness of the Firefly Algorithm in solving the Facility Layout Problem by generating the best solutions with respect to those provided by previous researches.