My knee has been swollen and hurting when I walk for approximately 2 weeks now I'm wondering now I don't recall any injury or justed started havi?

Get it looked at. This could be due to numerous things including arthritis (examples include gout, pseudogout, reactive arthritis) , infection and mechanical abnormalities in the joint (a meniscal tear can occur spontaneously). I recommend you go to your primary care provider as soon as possible since permanent joint damage can occur very quickly. You could also see an orthopedist or rheumatologist.
Several possibilitie. Pain and swelling in the knee with no injury new or old could lead us to think you may have some informatory process in the knee like gout or pseudo gout and other , please check it with your doctor. Good luck. Thanks.