Dear Mr. Electrician:  I want to control my ceiling fan and light separately with two wall switches.

Answer:  To control the ceiling fan and light separately with two wall switches a three conductor cable needs to be installed from the switch location to the ceiling fan location.  NOTE: Some text links below go to applicable products on Amazon or EBay.

The old existing wall switch that controlled the switched outlet
The old existing wall switch that controlled the switched outlet

In the above switch box the white wire is usually the hot wire or the LINE and the black wire is the LOAD.  When the wiring is checked at the outlet, a white wire is seen connected to the hot black wires.  This is normal, however the white wire should have been re-identified with a different color.

An electrical outlet that is controlled by a wall switch

An electrical outlet that is controlled by a wall switch

Switched outlet wiring connections
Switched outlet wiring connections

I changed the wiring connections so that the outlet was hot at all times and the switch box now had a hot and a neutral.  My post about converting a switched outlet to hot will be very helpful to you.

Drilled hole in wall top plate view from attic
Drilled hole in wall top plate view from attic

The blue arrow points to a hole that was drilled into the top plate of the wall so that a cable could be fished down to the switches.  The green arrow indicates where the ceiling drywall meets the top plate of the wall.

Fiberglass wire fishing rod resting on top of attic insulation
Fiberglass wire fishing rod resting on top of attic insulation

A fiberglass wire fishing rod was used to pull the 14/3 Romex cable across the attic.

14/3 Romex cable for ceiling fan power is stapled to attic truss
14/3 Romex cable for ceiling fan power is stapled to attic truss

The 14/3 Type NM-B Romex cable is stapled to the side of the attic trusses.

Type NM-B 14/3 electrical cable going down into the wall to the new switch box
Type NM-B 14/3 electrical cable going down into the wall to the new switch box

The hole in the top plate was filled in with firestop caulk.

14/3 Romex cable installed in attic to power new ceiling fan
14/3 Romex cable installed in attic to power new ceiling fan
Newly enlarged hole with wires protruding for a two gang old work electrical switch box
Newly enlarged hole with wires protruding for a two gang old work electrical switch box

The old switch box was removed and the existing hole in the wall was made larger to accommodate the new two gang plastic old work electrical box.

Switch wires pigtailed and ready for new wall switches to control the ceiling fan and light
Switch wires pigtailed and ready for new wall switches to control the ceiling fan and light

I used the excess wire from the 14/3 Romex as pigtails for the LINE connections to the the switches.  The 14/3 contains the light and fan LOAD wires going up to the ceiling fan.

Two gang old work plastic switch box installed in a wall with a sheet metal screw for extra support
Two gang old work plastic switch box installed in a wall with a sheet metal screw for extra support

One screw was driven through the box into the wood wall stud to secure the electrical box.  Doing this can be considered a code violation by some electrical inspectors, but it does make the electrical box more secure over the long term.

Two single pole toggle switches wired to control a new ceiling fan with a light
Two single pole toggle switches wired to control a new ceiling fan with a light
Two single pole toggle switches mounted on a two gang old work plastic electrical box
Two single pole toggle switches mounted on a two gang old work plastic electrical box

Depending on the brand and type of wall plate to be installed, it is sometimes better to remove the ears from the switches and outlets when installing them on plastic old work boxes.  When I install steel old work boxes I usually remove the ears.  See how I changed one switch to two switches in this ceiling fan installation post.

Ceiling fan electrical box hanging from the ceiling by a 14/3 Romex cable
Ceiling fan electrical box hanging from the ceiling by a 14/3 Romex cable

Above, the old work fan brace is depicted installed inside of the ceiling.  The steel octagonal box is ready to be attached.

Ceiling fan electrical box mounted onto ceiling fan brace with wires hanging out
Ceiling fan electrical box mounted onto ceiling fan brace with wires hanging out

All metal electrical boxes must be grounded.  Part of the grounding conductor is under the green grounding screw with the end hanging out for connecting to.  The fan box above also has 8/32 screw holes for a standard ceiling light fixture to be attached.

EBay Has Thousands of Ceiling Fans For Sale

Close shot of a ceiling fan electrical box ground screw
Close shot of a ceiling fan electrical box ground screw
Ceiling fan bracket attached to ceiling fan electrical box with wires hanging out
Ceiling fan bracket attached to ceiling fan electrical box with wires hanging out

The above is one of many different styles of ceiling fan bracket that comes with each ceiling fan.  They are all made to be mounted onto a standard fan rated electrical box.

Ceiling fan bracket with rod attached and wires spliced
Ceiling fan bracket with rod attached and wires spliced

All ground wires get connected together.  All white neutral wires go together.  If you were going to install a remote control, this is where it gets inserted.

Ceiling fan bracket with ceiling fan rod attached and wires spliced inside of the ceiling fan electrical box
Ceiling fan bracket with ceiling fan rod attached and wires spliced inside of the ceiling fan electrical box
Ceiling fan photographed while spinning
Ceiling fan photographed while spinning

Some of my other posts about ceiling fan installations may be helpful to you.