This change took place in the middle of the Civil War when West Virginia became a new state.
The "1861 Wheeling Convention" consisted of two sets of meetings held at what later became known as West Virginia Independence Hall. The first set was held in May and the second was held in June. These meetings repealed the "Ordinance of Secession" passed by Virginia. This established the "Restored Government of Virginia" and ultimately authorized the counties that organized the convention to become West Virginia. During this time of Civil War the Restored Government was recognized by the Union, including President Lincoln, as the State of Virginia with its capitol in Wheeling.
West Virginia Independence Hall
The first meeting outcome in a nutshell established that the Ordinance of Secession had to be voted on by the Virginian delegation before they could proceed. If it passed then the western counties would then go ahead with electing official delegates for representation at a second convention.
With the adoption of Virginia's Ordinance of Secession on May 23, the Second Wheeling Convention began on June 11 as decided at the First Convention. The first measures adopted at the Convention ruled that 88 delegates representing 32 counties were entitled to seats in the convention. On June 19, delegates approved a plan that called for the permanent and decisive separation from the eastern portion of the state. The following day new officers of the Virginia State Government were chosen and Francis Pierpont was elected Governor. This new government became known as the "Reformed Government of Virginia" to distinguish itself from the secessionist government in Richmond.
President Lincoln recognized the new government as the legitimate authority for the whole of Virginia, and the United States Congress seated Representatives and Senators loyal to the restored government and the Union on behalf of Virginia. The Restored Government met in Wheeling until the northwestern part of the state was separately admitted to the Union on June 20, 1863.
On August 26 1863, Governor Pierpont moved the Restored Government to Alexandria (a city across the Potomac River from Washington, D.C. that was under Union control for the entirety of the war).
At the end of the war in May 1865, the government was moved to Richmond, VA. Before Virginia could be readmitted to the Union, they had to consent to the creation of the State of West Virginia retroactive to 1863.
Mineral County was created in 1866 by an Act of the West Virginia Legislature from the existing Hampshire County.