In a typically commercial or residential building, the indoor lighting system can be considered as one of the largest single consuming units amongst many electrical loads. Saving energy in such a lighting system is utmost important whilst satisfying lighting user’s preference as well. This paper presents a controllable LED lighting system embedded with ambient intelligence gathered from a distributed smart wireless sensor network (WSN) to optimize and control the lighting system to be more efficient and user-oriented. In this proposed WSN-based control system, there is an inherent problem with the operational lifetime of its wireless sensor nodes limited by the finite energy capacity of their onboard batteries. To overcome this WSN’s problem, an energy-aware communication protocol is introduced to reduce the power consumption of the WSN in order to prolong its operating time. The proposed smart WSN-based LED lighting system has been test-bedded and retrofitted into an existing workplace to conserve up to 10 % of waste light energy without compromising the workplace lighting condition. As for the operational lifetime of the proposed energy-aware WSN-based control system, the experimental results show that the wireless sensor nodes are able to operate for a longer period of time, from 87 days to 102 days, with about 20 % increase in their operational lifetimes.