Original: In 1977, the State of Mato Grosso was split into two, and Campo Grande became the capital of the new state of Mato Grosso do Sul, comprising the southern portion of the former state.
Simplified: When Mato Grosso do Sul left Mato Grosso and became it's own Brazilian state, Campo Grande became the new capital.