You can always play in offline mode and hone your melee skills vs. the computer players there.
While they wont mimic the true skills of people you meet online, it's better than nothing at all.
Additionally, learn the different speeds, ranges and hit timing of each weapon.
You can swing the scout bat much faster than the heavy can punch, for example.
The demoman's "Eyelander" sword has a much larger range than most weapons and can hit from what feels like a non-melee distance, compared to most other classes melee that requires you to be much closer.
Also, each weapon has a slightly different "delay" between when you click and when the swing actually has the window to connect.
It's minor, but worth getting a feel for.
Lastly, learn your limits.
It's not wise to melee certain classes if avoidable.
Pyros and heavies are dangerous targets to melee, and scouts tend to be too fast to hit reliably in melee range.
gaming.stackexchange.com/users/414/TheQ
I agree with the other answers here: That practice is the best way to improve your melee skills.
As part of the 2010 Christmas update , a new game mode was released: Medieval Mode .
This is a melee only mode, with the exception that the Sniper can use the Huntman and the Medic can use the Crusader's Crossbow because these are considered to be Medieval weapons.
I have found this a great way to practice my (admittedly poor) melee skills.
Currently this game mode is only available on the DeGroot Keep map, which makes it really easy to find a medieval game to practice on: From the title screen, click Start Playing Ensure that the Simplified List option is unticked Enter cp_degrootkeep into the Map textbox
This will filter the server list to only show active games that are currently playing Medieval Mode.
Note: For the full range of allowable weapons in Medieval Mode, I recommend checking the Team Fortress wiki .
gaming.stackexchange.com/users/7313/bcpettifer
One useful tactic I've found is to keep your distance.
You don't have to be "hugging" your enemy to hit them, and if you do it will make it harder for you to turn and smack them when they move around.
Melee range might be short but it's not zero, and it's much easier to hit them when you have a bit of distance.
I have to confess I have trouble keeping the distance myself.
I'd recommend practicing a bit offline - even by doing something as silly as hitting the wall - just to see how far you can be from the contact point.
Also, whenever I melee someone I tend to move backward a bit
and then forward again in-between weapon swings, for the same reason - to be able to track them easier.
gaming.stackexchange.com/users/122/Oak
I'd find a friend and an empty server and practice melee fighting with each other.
One of my old clans used to have boxing matches once the heavy got the KGB every once in a while.
Things like that help out a lot.
gaming.stackexchange.com/users/44/Corv1nus
It's all about choosing the best time to break out the Melee weapon.
There are times you want to use it, and times it would be wise to avoid it.
Good Times
To Use Melee Weapons When you've flanked your opponent and want to take them by surprise (Melee is initially quieter than bullets)
When they're on the run (A single melee hit does consistent damage, and can finish off low-health classes) When you can outrun them (trying to run down someone who is faster than you will never work.
You need a class with some speed to attempt melee combat (unless...))
When the target is stationary (A stationary target, like a scoped-in sniper, is perfect for a melee assault.
You're practically guaranteed to hit them several times.
Bad Times
To Use Melee Weapons In a head-on assault (Unless your target is very bad at aiming, you're likely to die before you get close enough for a head-on melee assault) Against a Pyro (Pyros will wreck you in melee.
Do not attempt melee against a pyro) Against an overheal target (
Any class that is overhealed or very healthy will notice your assualt well before it will do any good (Unless you're a Demoman with a shield, or get lucky with a crit).
Instead, GO FOR THE MEDIC!
Melee works great against an unaware Medic)
gaming.stackexchange.com/users/55285/Zibbobz
You can find melee only maps.
And/or use a bigger weapon like the eyelander to get some fun practice.
It's just a practice thing, challenge yourself.
gaming.stackexchange.com/users/1920/Jethro Larson
Currently i am one pf the best asian melee user compared to the Bx,and i really love to use persian persuader,the trick on using it is : it dont swing from top to bottom,it swing from right to left,making u can have some "tricks" to hit the opponent,such as hitting them after you dodge their hits,might be quite tricky
but u can easily do it if u concentrate and train harder,also if u are 1 on 1 or chased by multiple enemies,wait until they uses all their charge,then charge-hit them back (WARNING :
u must know how far will they charge,then counter AFTER they've charged)
well that is from me (
the account i use to reply this comment is my friend's)
gaming.stackexchange.com/users/107441/the gamer
I have real trouble trying to use the melee weapons in Team Fortress 2.  I always seem to miss.  Are there any tips for making good use of the melee weapons, or what can I do to train this skill?
How can I improve my melee skills in TF2?
gaming.stackexchange.com
<team-fortress-2>
gaming.stackexchange.com/questions/3150
gaming.stackexchange.com/users/121/C. Ross
Practise in offline mode to hone your melee skills. It is for sure down to practice, which can be done in offline mode. However it is important to keep in mind that melee range is not zero, therefore keeping a small distance may help with getting hits.
Users suggest more practice, in offline mode.  Another tip is that melee range is not zero, therefore keeping a small distance may help with getting hits