Hemlock is rated as low in decay resistance, prone to distinct warping, and shrinks quite a bit. But, if kept dry, any wood is rot resistant.
Is hemlock wood good for outdoor use?
Hemlock is a great wood for outdoor use, as mentioned pests won't get in it and it is very rot resistant.
How long will hemlock wood last?
Hemlock is locally widely used for raised garden beds, fencing, and barn construction and repair. There is no guarantee as to how long the wood will last in the ground, but in the right conditions, some people report that it lasts 5 to 7 years.