Can you connect your quarter inch headphone jack into your electric guitar?

Yes you can but connect it like this Guitar>amp, amp > 6.35mm , 3.5mm > Computer, Computer > an audio recording program like Audacity , for the amp i would preferably use a line 6 spider 4