In short: No you can't, you still need that free hand
When casting spells you typically need 1, 2 or all 3 types of component: Material, Somatic, and Verbal. Spells that require a verbal component only require the use of your mouth, however Somatic and Material components require a free hand:
Spellcasting gestures might include a forceful gesticulation or an
intricate set of gestures. If a spell requires a somatic component,
the caster must have free use of at least one hand to perform these
….. A spellcaster must have a hand free to access these components,
but it can be the same hand that he or she uses to perform somatic
A shield does take the use of one of your hands as does the Hexblade. For Hexblade Warlocks, the Hexblade can't be used a spellcasting focus nor is any indication given that you can perform Somatic components while holding the Hexblade in your hand. Looking into Warlocks further I found no evocations or class abilities that would allow any similar effect to what you are looking for.