Generic ideas (not system specific):
Did you stop using any USB hubs and removed them?
Did you remove all other USB devices?
Did you confirm that every USB connection remaining in use was fully inserted?
Did you power down and unplug system to reset motherboard?
Did you try several different USB ports both front and back with both mouse/keyboard?
On start, can you enter BIOS - does keyboard work at the BIOS screen? If it does, then you may have driver troubles. If not, probably hardware troubles - if you tried a second mouse/keyboard then possibly bad motherboard.
If your computer has PS/2 ports, get PS/2 keyboard / mouse and try them.
Once booted into windows, inspect USB in Device manager - errors? Consider disabling and removing all USB in Device manager and re-boot.
If unable to get into windows, consider factory reset.