In this paper, we analyze the holographic cosmology using a M2-M5 brane configuration. In this configuration, a M2-brane will be placed in between a M5-brane and an anti-M5-brane. The M2-brane will act as a channel for energy to flow from an anti-M5-brane to a M5-brane, and this will increase the degrees of freedom on the M5-brane causing inflation. The inflation will end when the M5-brane and anti-M5-brane get separated. However, at a later stage the distance between the M5-brane and the anti-M5-bran can reduce and this will cause the formation of tachyonic states. These tachyonic states will be again open a bridge between the M5-branes and the anti-M5-branes, which will cause further acceleration of the universe.