You might ask the neighbor to provide a survey showing the fence is on their land. You should also contact the city or village building inspector and ask them to come out and see if the fence is on their property or yours. Some towns require permits to install a fence, but a lot of people don't know this. In Mount Prospect, if you start building your deck before a city inspector checks the depth of the holes for your support posts, the city will make you take it down and dig up the posts so they can measure the holes.
If they built the fence on your land, even by an inch, then have the lawyer who you were going to use to handle the closing send them a letter and inform them that you will allow them access to your property to remove the fence, name a time limit, and specify that they must repair all damage to the yard (remove concrete and posts, refill holes with dirt and seed or sod. If they do not comply, you are in your rights to remove any fencing on your land. You do not have to ask their permission. They trespassed.
If they are informed that you have every legal right to tear down the fence, and can sue them for damages, including the cost of having the fence removed, fixing the property, hiring a lawyer, they will probably fix the problem promptly.
In Illinois they do not have the right to even let cement for post holes encroach on your property. When you close the Title Company will almost always require a survey to show all of the property you are selling is within your lot lines, and no structures sit on an easement. If they do, there needs to be a waiver, and the buyers need to accept the property with a "tarnished title". So you pay now or you pay later.
Warning - your neighbor may offer to 'buy' the area of your property where the fence was placed by mistake. To properly sell them that section and be able to sell your house means you have to subdivide your lot. The fee for subdividing a property is very steep. Where I used to live it started at $10,000. Fees are weighted so that it costs almost as much to sell off the back two feet of your lot as it does to divide a large lot into 3 or 4 properties.
I am a retired Realtor and ran into these issues in my practice. One family had extreme pressure from the neighbors not to have their property survey done, because they were afraid long standing garages and fences would end up being on the wrong side of property lines. The Buyers attorney wisely insisted on the survey, as the garage appeared to be very close to the property line. As it turned out everything was just where it was supposed to be, and all of those nervous neighbors were relieved to know that they did not have to worry when they went to sell.
Daughter of the Attorney who codified Arlington Hts Building Codes.
You need to have a survey if you haven't had one done already. In Hawaii, a survey is required for all homes that involve a lot purchase at the same time, for this very reason. At closing, if there are any encroachments (such a fence) on your property, they are only allowed to extend a very short distance (1/2 a foot or so) on to your property.
Since you will probably need a survey anyway, I would start shopping for a surveyor now. You will need to get that fence issue cleared up anyway, so it doesn't come back to cause problems later.