The modern concept of magnetic monopole (as a real isolated charge) is due to Dirac in 1931, although Curie speculated about the possibility earlier. Even electric charges, as in particles, only appeared in 19th century, see Wikipedia's Discovery of two kinds of charges. Before that electricity and magnetism were mostly viewed as produced by fluids, one or two. That was Franklin's (one) and Coulomb's (two) view, for example.
The identification of two magnetic poles in magnets is suggested by Peregrinus, and more explicitly by Gilbert. The first quantitative model that interprets magnets as dipoles with the poles attracting/repulsing according to the inverse square law appears in Michell's Treatise of Artificial Magnets (1750). Here is from History of the Theories of Aether and Electricity:
"In this he states the principles of magnetic theory as follows:
"Wherever any Magnetism, is found, whether in the Magnet
itself, or any piece of Iron, etc., excited by the Magnet, there are
always found two Poles, which are generally called North and
South; and the North Pole of one Magnet always attracts the
South Pole, and repels the North Pole of another: and vice versa"
This is of course adopted from Gilbert. "Each Pole attracts or repels exactly equally, at equal distances, in every direction." This, it may be observed, overthrows
the theory of vortices, with which it is irreconcilable. "The Magnetical Attraction and Repulsion are exactly equal to each other." This, obvious though it may seem to us, was really a most important advance, for, as he remarks,
"Most people, who have mention'd any thing relating to this property of the Magnet,
have agreed, not only that the Attraction and Repulsion of Magnets are not equal to each other, but that also, they do not observe the same rule of increase and decrease... The Attraction and Repulsion of Magnets decreases, as the
Squares of the distances from the respective poles increase."
This great discovery, which is the basis of the mathematical
theory of Magnetism, was deduced partly from his own observations,
and partly from those of previous investigators (e.g.
Dr. Brook Taylor and P. Muschenbroek), who, as he observes,
had made accurate experiments, but had failed to take into
account all the considerations necessary for a sound theoretical
discussion of them.
Interestingly, the inverse cube law for dipoles that follows from it was noted experimentally already by Newton in Principia, see Is Coulomb's law the earliest mathematical formula describing electricity? Aepinus suggested identifying the poles with shortfalls and excesses of the magnetic fluid in 1759, with a mechanistic explanation for the inseparability of the poles, and Brugmans and Wilcke instead introduced two opposing fluids, called "boreal" and "austral". Michell's dipole model was supported by Mayer and Lambert, and became standard after Coulomb's experiments (1777), whose sources were not particle charges, but boreal and austral fluids jointly locked within molecules. Here is from Whittaker again:
"Coulomb rendered great services to magnetic theory. It was
he who in 1777, by simple mechanical reasoning, completed
the overthrow of the hypothesis of vortices. He also, in the
second of the Memoirs already quoted, confirmed Michell's
law, according to which the particles of the magnetic fluids
attract or repel each other with forces proportional to the
inverse square of the distance.
Coulomb, however, went beyond
this, and endeavoured to account for the fact that the two
magnetic fluids, unlike the two electric fluids, cannot be
obtained separately; for when a magnet is broken into
two pieces, one containing its north and the other its south
pole, it is found that each piece is an independent magnet
possessing two poles of its own, so that it is impossible
to obtain a north or south pole in a state of isolation.
Coulomb explained this by supposing that the magnetic
fluids are permanently imprisoned within the molecules
of magnetic bodies, so as to be incapable of crossing from
one molecule to the next; each molecule therefore under all
circumstances contains as much of the boreal as of the austral fluid, and magnetization consists simply in a separation
of the two fluids to opposite ends of each molecule. Such
a hypothesis evidently accounts for the impossibility of
separating the two fluids to opposite ends of a body of finite
size. The same idea, here introduced for the first time, has
since been applied with success in other departments of
Ampere's "molecular currents" replaced Coulomb's magnetic fluids with circulating electric ones, see What is the history of electric current and resistance? There was little motivation to ponder magnetic charges before the existence of electric ones was accepted in the second half of 19th century.