Yes, you can put pressure-treated wood in the ground. Just make sure to purchase ground-contact wood. Ground contact pressure-treated lumber has twice the preservatives to make it more durable.