Yes. Within the span of a few days in April 1861, Lee was offered command of both the Union and Confederate forces.
Although he opposed slavery and secession and believed the South could not win, his loyalty to his home state of Virginia led him to accept the Confederate command.