In islanded microgrids, rechargeable batteries are widely used as storage systems to complement the power imbalance in real-time. Among others, lithium-ion battery is the most popular owing to its high energy density, low self-discharge and long lifespan features. However, the cycle degradation becomes an unavoidable concern in microgrid economic operation. In this paper, a novel degradation model based on online auction and rainflow cycle counting algorithm is proposed for real-time management of lithium-ion batteries. Based on the proposed model, a mixed integer nonlinear problem is formulated for online operation of the islanded microgrid. To confront with the uncertainties involved in a lookahead window, the formulated problem is tackled by weighted model predictive control(MPC). Monte Carlo simulations covering 365 consecutive days verify the effectiveness of the proposed model and its application in real-time microgrid operation concerning degradation cost.