It is possible to (1) pour a concrete slab just inside of where the footer/wall foundation would be, (2) raise the building straight up off the slab with a jack; and (3) pour footers and wall foundation in that sequence. Based on the post by 8934, I think he is also suggesting that the exterior walls should be braced. This approach is certainly an improvement over the termite eaten structure he started with.
Another possibility is to get a house mover to put the structure on steel and lift it up for you.
A combination of methods and sequences may be needed depending on your structure and what you have to work with. Whatever you do, be sure you can handle the work safely. You haven't gained anything if you get yourself or someone else hurt.
Anyone wanting to do this has to determine why the building is sinking and make the needed correction. In my case, the concrete grade beam was crumbling and was too narrow to start with. So a wider footer was poured.
Although my tractor was used some in the process to remove the remains of the grade beam, this is largely a pick, shovel, and wheelbarrow operation.
I think I recall that BrentD is also dealing with a post foundation. Removing the posts from underneath the wall will present some clearance issues. The building may have to be raised and then a section of posts cut off, posts pulled up further, sections cut off, etc. until the entire post is out. The alternative is to leave part of the posts and pour a thick enough footer to carry the load regardless of the posts rotting out later, I suppose.
demansoft brings up a good point about the possibility that the codes people might go nuts if the building appears to have been made taller in the process. Even if you set it down exactly at the same level, it may look taller once you eliminate the sagging. I suppose you could always establish a reference point and set it back down to that reference point if the final height might be an issue.
The other issue is having access to your neighbor's property to work on your building. It's a blessing that your neighbor is cooperative. Neighbors change. Code inspectors change. Codes change. You may want to get this done when folks are still friendly. If you get a neighbor later who won't let you work off his property, it could makes things more difficult.
My Grandmother had one of these narrow garages with a dirt floor. It had been extended to make a double car garage and had been extended to make it longer. I asked my Dad about it, and he said it was built when cars first came out and they were much narrower and shorter than cars built in later years.