Units in hand-to-hand fighting are far too busy to use missile weapons and therefore may not shoot.
Units are not normally allowed to shoot against enemy units that are engaged in close combat - the risk of hitting their own comrades is far too high.