Before the vector
Before vector calculus was introduced, a few landmarks have to be considered to understand vector history. These are:
- complex numbers and their geometrical interpretation
- Leibniz's work on the geometry of position
- the parallelogram representation of force and velocity
The first one can be traced back to Cardan's Ars Magna
published in 1545 as the guy was the first to introduce roots of negative numbers for themselves. One has to wait for two centuries before witnessing approval of this strange writing.
Leibniz, in a letter to Huygens, express the will to give position a mathematical expression, just as amplitude has one. This is exactly what vectorial analysis is about, right? Unfortunately, I don't know what Leibniz' answer to his own question was.
Now let's quote a genius
"A body, acted on by two forces simultaneously, will describe the
diagonal of a parallelogram in the same time as it would describe the
sides by those forces separately."
Newton in 1678, did not have the idea of a vector, but this does look like the sum of two vectors, right?
Between 1799 and 1828, three pairs of two authors simultaneously and independently worked on the geometry of complex numbers. Wessel and Gauss in 1799 wrote independently on how to represent direction analytically, Buéé and Argand follow up in 1806 with geometrical interpretations for complex numbers, and Warren and Mourey both published in 1828 extensive books describing such representations.
Going 3-D: the quaternion
Hamilton (we're getting closer to electromagnetism) published a philosophical-ish paper in 1837 in which he expresses his hope to come up with a "theory of triplets" to describe 3-D geometry. In 1843 he finally comes up with a multiplication operation on what is now known as quaternions. He was very happy with that and proceeded to spend the rest of his life writing on quaternions.
Hamilton (him again) introduced in a subsequent paper (1846) the terms scalar and vector, to describe the real and imaginary parts of his quaternions. The vector part of the quaternion product of two purely vectorial quaternions is equal to the opposite of what is know the vector/dot product, and the scalar part is what is now known as the cross product.
Hamilton died but left a successor to his cause, Tait. Tait published numerous papers on quaternions, including extensive description of the use of operator Nabla which earned him Maxwell's praise as the "Chief Musician upon Nabla".
Maxwell, or answering the original question
In 1873, Maxwell published his Treatise on Electricity and Magnetism
, a paper that had a huge impact on 19th century science. In this paper, Maxwell presents many of his results not only in the then-usual cartesian form, but also in their quaternionic forms. Maxwell defended and advertise the use of quaternions, not only as a practical tool (he seemed to be more at ease with cartesian geometry), but as a more effective way to think space-related quantities.
For what I know, Maxwell did not contribute anything to vector calculus, but his endorsement of the then praised, but not used, quaternions in a breakthrough paper allowed vector calculus to become a widespread object in physics. Modern (post-Hamilton) Vector Analysis is mostly based on Gibbs and Heaviside work at the turn of the 20th century, but Maxwell sure contributed a lot to vector calculus by using them in what is, perhaps, the most read paper of the 19th century.
This answer is based both for structure and content on a talk that I invite you to read as it's a very entertaining/informative piece of writing.