The high instantaneous discharging capability of battery energy storage systems (BESSs) make them ideal candidates for reducing peak loads in commercial buildings. An efficient online BESS control algorithm can be beneficial for reducing the monthly electricity bill of individual commercial buildings. Conventional model-based BESS control algorithms rely heavily on accurate long-horizon net load forecast, which is difficult to obtain. To address this problem, we develop a Lyapunov optimization-based online BESS control algorithm and derive its theoretical performance bound. Comprehensive numerical study results using real world commercial building smart meter data in southern California show that our proposed Lyapunov optimization-based online control algorithm with time-varying weighting parameters yields higher savings in electricity cost and requires less computation time in comparison to the state-of-the-art baseline algorithms.