Watch the Shuffle E online guitar lesson by Jeff McErlain from Essentials: Advanced Blues Rhythm
The origins of the boogie-woogie dates back to the 1920's with its roots in African music. Blues of course is an African American art form that's an amalgamation of African music, field hollers, spirituals, and dance music. The guitar became the main instrument of the blues due to its relatively inexpensive price, thanks to the Sears and Roebuck catalog, and its portability.
Blues was dance music, and largely performed on cotton plantations in juke joints. Juke joints are usually found on the plantation, due to segregation and the Jim Crow laws. They were rough places, as is well documented by historians. The music began a northern migration in the Delta to Chicago. BB King, for example, was born in Mississippi and moved to Chicago. As the times and technology progressed, people picked up electric guitars and plugged it in.