No, you do not need to know good grammar to write well, though it helps.
What you do need to know is what you want to say.
Sit down at your computer and say it. Use your own words and let your way of thinking and speaking come through in your writing. That way might follow rules of grammar or it might not but it will be your way and if you are writing from your heart then readers will sense that whether your writing is grammatically correct or not.
Of course, if you plan on making a career of writing, then it’s a good idea to start learning good grammar because it’s a good skill to have and will be expected of most professional writers, though I do know at least one writer whose publisher told her not to take grammar lessons because her style came through best writing as she learned to speak, which was colloquial.