The cosmological constant was originally introduced by Einstein in 1917 as a repulsive force required to keep the Universe in static equilibrium which follows steady-state-theory. In trying to solve the differential equations that describe space-time, his field equations predicted that the universe should be either contracting or expanding. In the year 1922, Russian physicist Friedmann derived solutions to Einstein's equations that corresponded to an expanding universe. Einstein needed to add a constant term to avoid having the universe collapse upon itself. This term balances the attractive force of gravity contributed by all of the matter in the universe.
Hubble's study of nearby galaxies showed that the universe was in fact expanding and that lead to the Big Bang theory, the concept introduced in 1927 by Georges LeMaitre.Einstein regretted the introduction cosmological constant to keep the universe static and termed it as greatest mistake.
After almost 100 years we realized that the Universe does in fact have a non-zero cosmological constant: that’s what we call dark energy, and use to explain the accelerated expansion of the Universe. Physically, this term represents the vacuum energy, the possibility that empty space possesses density and pressure thus preventing the universe from collapsing.
If indeed the cosmological constant represents the dark energy or vacuum energy then Einstein by mistake proposed the dark energy concept.