This paper discusses optimal energy management considering battery characteristics for smart grid and microgrid systems. Energy storage systems are very important for energy peak shifting and peak load cutting in microgrid and smart grid systems, but optimal battery formulation and energy management in the use of expensive energy storage system and methods of taking account of battery characteristics are still in the developmental stage. First, the optimal battery placement for a smart grid system with lithium-ion batteries is considered as a means of lifetime extension. The battery choice index for this optimal battery utilization problem of optimal energy management is discussed. Second, a smart grid system with a distributed battery system for grid frequency control with consideration of distributed control and battery characteristics is discussed. Optimal controllers for distributed battery systems to reduce the battery load and to expend the battery lifetime are designed. Simulations are used to demonstrate the effectiveness of the proposed method in comparison with conventional methods. C⃝ 2015 Wiley Periodicals, Inc. Electr Eng Jpn, 194(1): 18-26, 2016; Published online in Wiley Online Library (wileyonlinelibrary.com).