There are many much better suited to answer, but I'll give some quick info.
Changing movement speed globally is easy. Changing it based on context (only combat), probably requires scripting, which is significantly more effort. Scripting often requires testing and tweaking to get right and deal with special cases, too.
If you're looking to do modding, you should go ahead and give it a try. Read through and watch some tutorials, then go for it.
If you're just looking for a quick fix, you might want to look at some of the mods out there. I don't know of anything that does exactly what you're looking for but Duke Patrick's for example, slows combat and makes it more strategic (though overall combat is harder). Deft Movement Slow Combat has options to go into slow time during attacks. There are others that might fit your needs if you search around nexus.
http://skyrim.nexusmods.com/mods/3646
http://skyrim.nexusmods.com/mods/6478 (one of the options is to give 100% chance to go into slow-time on any attack, you also might be able to adapt this to what you want)